Mercurial > projects > ldc
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/nested6.d Fri Nov 30 17:12:08 2007 +0100 @@ -0,0 +1,32 @@ +module nested6; + +void main() +{ + int i = 42; + + printf("Hello world %d\n", i++); + + class C + { + void func() + { + printf("Hello world %d\n", i++); + + class C2 + { + void func2() + { + printf("Hello world %d\n", i++); + } + } + + { + scope c2 = new C2; + c2.func2(); + } + } + } + + scope c = new C; + c.func(); +}