------- Comment #1 from  2009-05-05 00:16 -------
The foreach loop is actually not important.

void f(lazy void dg)

void main()
        void foo() { Stdout.formatln("o hai"); }
        f({Stdout.formatln("lol wut");});

Only 'o hai' is printed, 'lol wut' never makes it.

In order to make it work, you have to put parens after the lambda:

f({Stdout.formatln("lol wut");}());

I'm not justifying the compiler's behavior :{ but that's the workaround I've
been using.


Reply via email to