https://issues.dlang.org/show_bug.cgi?id=17486

--- Comment #1 from Eyal <[email protected]> ---
This also breaks purity type checking:

@safe:

import std.stdio:writeln;

void f(lazy int x) pure {
    x();
}

unittest {
    int g() {
        writeln("impure func called by pure func!");
        return 5;
    }
    auto xx = (() => g());
    writeln("-> f");
    f(xx());
    writeln("<- f");
}

outputs:

-> f
impure func called by pure func!
<- f

--

Reply via email to