annotate tests/mini/nested5.d @ 341:1bb99290e03a trunk

[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
author lindquist
date Sun, 13 Jul 2008 02:51:19 +0200
parents test/nested5.d@d9d5d59873d8
children 45a67b6f1310
rev   line source
lindquist@128 1 module nested5;
lindquist@270 2 extern(C) int printf(char*, ...);
lindquist@128 3
lindquist@128 4 void main()
lindquist@128 5 {
lindquist@128 6 int i = 42;
lindquist@128 7
lindquist@128 8 printf("Hello world %d\n", i++);
lindquist@128 9
lindquist@128 10 class C
lindquist@128 11 {
lindquist@128 12 void func()
lindquist@128 13 {
lindquist@128 14 printf("Hello world %d\n", i++);
lindquist@129 15 //i++;
lindquist@128 16 }
lindquist@128 17 }
lindquist@128 18
lindquist@128 19 scope c = new C;
lindquist@128 20 c.func();
lindquist@129 21 assert(i == 44);
lindquist@128 22 }