Mercurial > projects > ldc
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/mini/nested6a.d Tue Jul 15 10:23:50 2008 +0200 @@ -0,0 +1,39 @@ +module nested6a; +extern(C) int printf(char*, ...); + +void main() +{ + int i = 42; + + printf("main() %d\n", i++); + + class C + { + int j; + void func() + { + int k; + printf("C.func() %d\n", i++); + + class C2 + { + int l; + void func2() + { + printf("C2.func2() %d\n", i++); + } + int m; + } + + { + scope c2 = new C2; + c2.func2(); + } + int n; + } + int o; + } + + scope c = new C; + c.func(); +}