On Friday, 15 May 2015 at 08:44:41 UTC, Ivan Kazmenko wrote:
Somehow reminds me of this lambda:
https://github.com/Hackerpilot/Idiotmatic-D/blob/master/idiotmatic.d#L127-L128

Maybe it generally blocks for initialization of variables:
https://github.com/Hackerpilot/Idiotmatic-D/blob/master/idiotmatic.d#L130-L131

-----
for ( { int i = 0; } i < 5; ++i ) {
        writeln("test");
}

It seems to me that this should be fixed :)

-----
int x;

void foo(int tmp) {
        x = tmp;
}
...
writeln( { int i = 5; writeln(i); foo(i); });
writeln(x);

Reply via email to