On 4/20/18 7:21 PM, Giles Bathgate wrote:
On Friday, 20 April 2018 at 23:13:58 UTC, Jonathan M Davis wrote:
Yes. That should work. e.g. this

import std.stdio;

void foo(lazy string l)
{
}

void main()
{
    foo({writeln("foo"); return "str";}());
}

compiles and runs just fine without printing anything, whereas you get a compilation error if you don't have the parens after the closing brace.

Ok cool. I've updated the PR since basically, I agree with your points about it being confusing to cater for the special case.



Yeah, I didn't mean for the special case to happen -- I thought it just worked!

I should have tested my original code... Sorry.

-Steve

Reply via email to