annotate tests/mini/nested2.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/nested2.d@f918f3e2e99e
children
rev   line source
lindquist@67 1 module nested2;
lindquist@67 2
lindquist@67 3 void func(ref int i)
lindquist@67 4 {
lindquist@67 5 delegate {
lindquist@67 6 assert(i == 3);
lindquist@67 7 i++;
lindquist@67 8 }();
lindquist@67 9 }
lindquist@67 10
lindquist@67 11 void main()
lindquist@67 12 {
lindquist@67 13 int i = 3;
lindquist@67 14 func(i);
lindquist@67 15 assert(i == 4);
lindquist@67 16 }