Mercurial > projects > ldc
comparison test/nested6.d @ 128:e5fe8521bbfa trunk
[svn r132] Added some tests. some will fail at the moment.
author | lindquist |
---|---|
date | Fri, 30 Nov 2007 17:12:08 +0100 |
parents | |
children | 8096ba7082db |
comparison
equal
deleted
inserted
replaced
127:facc562f5674 | 128:e5fe8521bbfa |
---|---|
1 module nested6; | |
2 | |
3 void main() | |
4 { | |
5 int i = 42; | |
6 | |
7 printf("Hello world %d\n", i++); | |
8 | |
9 class C | |
10 { | |
11 void func() | |
12 { | |
13 printf("Hello world %d\n", i++); | |
14 | |
15 class C2 | |
16 { | |
17 void func2() | |
18 { | |
19 printf("Hello world %d\n", i++); | |
20 } | |
21 } | |
22 | |
23 { | |
24 scope c2 = new C2; | |
25 c2.func2(); | |
26 } | |
27 } | |
28 } | |
29 | |
30 scope c = new C; | |
31 c.func(); | |
32 } |