Mercurial > projects > dstress
annotate nocompile/n/nested_class_04_C.d @ 1630:d0efa3ae5522 default tip
run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sat, 23 Apr 2011 22:57:32 +0200 |
parents | 2c10afcfcf76 |
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_C; | |
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 void bug(){ | |
26 o = new Inner(); | |
27 } | |
28 | |
29 bug(); | |
30 | |
31 return o; | |
1091 | 32 } |
942 | 33 } |
34 | |
35 int main(){ | |
36 Outer* outer = new Outer(); | |
37 outer.i = 1; | |
38 Outer.Inner inner = outer.test(); | |
39 outer.i = 2; | |
40 | |
41 if(inner.x != 1){ | |
42 assert(0); | |
43 } | |
44 | |
45 return 0; | |
46 } |