Mercurial > projects > dstress
annotate run/invariant_14.d @ 374:f87ba6507260
added missing meta-data
author | thomask |
---|---|
date | Thu, 31 Mar 2005 09:01:33 +0000 |
parents | 4cd33115f015 |
children | 1e6afb94ce6d |
rev | line source |
---|---|
140 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
202 | 5 // @author@ Thomas Kuehne <thomas-dloop@kuehne.thisisspam.cn> |
70
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
59
diff
changeset
|
6 // @date@ 2004-10-22 |
140 | 7 // @uri@ news:clbr09$uc6$1@digitaldaemon.com |
8 // @url@ nntp://digitalmars.com/digitalmars.D.bugs/2140 | |
70
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
59
diff
changeset
|
9 |
374 | 10 module dstress.run.invariant_14; |
59 | 11 |
12 class Parent{ | |
13 | |
14 int x; | |
15 | |
16 this(){ | |
17 x=3; | |
18 } | |
19 | |
20 invariant{ | |
21 assert(x>2); | |
22 } | |
23 } | |
24 | |
25 class Child : Parent{ | |
26 } | |
27 | |
28 class GrandChild : Child{ | |
29 | |
30 this(){ | |
31 x=5; | |
32 } | |
33 | |
34 invariant{ | |
35 assert(x>4); | |
36 } | |
37 } | |
38 | |
39 int main(){ | |
40 GrandChild gc = new GrandChild(); | |
41 return 0; | |
42 } |