Mercurial > projects > dstress
annotate run/n/nested_class_04_D.d @ 1319:81222734adf3
sed'ed replacement of new:...http.d.puremagic.co... with http://d.puremagic.com/issues/show_bug.cgi?...
author | thomask |
---|---|
date | Sun, 31 Dec 2006 19:58:06 +0000 |
parents | 9dcac8d4e97f |
children |
rev | line source |
---|---|
942 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ <jarrett.billingsley@gmail.com> | |
6 // @date@ 2006-04-02 | |
1319
81222734adf3
sed'ed replacement of new:...http.d.puremagic.co... with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents:
1091
diff
changeset
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=80 |
942 | 8 |
9 module dstress.run.n.nested_class_04_D; | |
10 | |
11 struct Outer{ | |
12 int i; | |
13 | |
14 class Inner{ | |
15 int x; | |
16 | |
17 this(){ | |
18 x = i; | |
19 } | |
1091 | 20 } |
942 | 21 |
1091 | 22 Inner test(){ |
942 | 23 Inner o; |
24 | |
25 o = new Inner(); | |
26 | |
27 return o; | |
1091 | 28 } |
942 | 29 } |
30 | |
31 int main(){ | |
32 Outer* outer = new Outer(); | |
33 outer.i = 1; | |
34 Outer.Inner inner = outer.test(); | |
35 outer.i = 2; | |
36 | |
37 if(inner.x != 1){ | |
38 assert(0); | |
39 } | |
40 | |
41 return 0; | |
42 } |