Mercurial > projects > dstress
annotate run/invariant_15.d @ 70:5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
2) updated todo
author | thomask |
---|---|
date | Sat, 23 Oct 2004 22:47:47 +0000 |
parents | 96cadd0da1ae |
children | a33ad7189d21 |
rev | line source |
---|---|
70
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
59
diff
changeset
|
1 // @author@ Thomas Kuehne <thomas-dloop@kuehne.cn> |
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
59
diff
changeset
|
2 // @date@ 2004-10-22 |
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
59
diff
changeset
|
3 // @uri@ news://clbr09$uc6$1@digitaldaemon.com |
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
59
diff
changeset
|
4 // @url@ nttp://digitalmars.com/digitalmars.D.bugs:2140 |
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
59
diff
changeset
|
5 |
59 | 6 module dstress.run.invariant_15.d; |
7 | |
8 class Parent{ | |
9 | |
10 int x; | |
11 | |
12 this(){ | |
13 x=3; | |
14 } | |
15 | |
16 invariant{ | |
17 assert(x>2); | |
18 } | |
19 } | |
20 | |
21 class Child : Parent{ | |
22 } | |
23 | |
24 class GrandChild : Child{ | |
25 | |
26 int y; | |
27 | |
28 this(){ | |
29 y=5; | |
30 } | |
31 | |
32 invariant{ | |
33 assert(y>4); | |
34 } | |
35 } | |
36 | |
37 int main(){ | |
38 GrandChild gc = new GrandChild(); | |
39 return 0; | |
40 } |