annotate tests/mini/nested5.d @ 1651:cb960b882ca3 tip

bindings were moved to dsource.org/projects/bindings/
author Moritz Warning <moritzwarning@web.de>
date Thu, 20 May 2010 20:05:03 +0200
parents 45a67b6f1310
children
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 {
tomas@468 14 printf("Hello nested world %d\n", i++);
lindquist@129 15 //i++;
lindquist@128 16 }
lindquist@128 17 }
lindquist@128 18
tomas@468 19 auto c = new C;
lindquist@128 20 c.func();
tomas@468 21 printf("i = %d\n", i);
lindquist@129 22 assert(i == 44);
lindquist@128 23 }