Mercurial > projects > ldc
comparison tests/mini/nested6a.d @ 370:051ab876fe11 trunk
[svn r391] Fix classes nested inside functions for real.
author | ChristianK |
---|---|
date | Tue, 15 Jul 2008 10:23:50 +0200 |
parents | |
children | 45a67b6f1310 |
comparison
equal
deleted
inserted
replaced
369:7d91d82000ae | 370:051ab876fe11 |
---|---|
1 module nested6a; | |
2 extern(C) int printf(char*, ...); | |
3 | |
4 void main() | |
5 { | |
6 int i = 42; | |
7 | |
8 printf("main() %d\n", i++); | |
9 | |
10 class C | |
11 { | |
12 int j; | |
13 void func() | |
14 { | |
15 int k; | |
16 printf("C.func() %d\n", i++); | |
17 | |
18 class C2 | |
19 { | |
20 int l; | |
21 void func2() | |
22 { | |
23 printf("C2.func2() %d\n", i++); | |
24 } | |
25 int m; | |
26 } | |
27 | |
28 { | |
29 scope c2 = new C2; | |
30 c2.func2(); | |
31 } | |
32 int n; | |
33 } | |
34 int o; | |
35 } | |
36 | |
37 scope c = new C; | |
38 c.func(); | |
39 } |