comparison test/nested2.d @ 67:f918f3e2e99e trunk

[svn r71] Fixed accessing parent function arguments from inside nested delegates. Some cleanups in VarExp::toElem.
author lindquist
date Sun, 28 Oct 2007 02:46:06 +0200
parents
children
comparison
equal deleted inserted replaced
66:0c5f410d973c 67:f918f3e2e99e
1 module nested2;
2
3 void func(ref int i)
4 {
5 delegate {
6 assert(i == 3);
7 i++;
8 }();
9 }
10
11 void main()
12 {
13 int i = 3;
14 func(i);
15 assert(i == 4);
16 }