Comment #0 by bearophile_hugs — 2013-03-29T11:44:42Z
I think foo2() too can be pure:
void main() {
immutable int x;
int foo1() pure { return x; } // OK
int delegate() pure foo2 = () => x; // error
}
But DMD 2.063alpha gives:
test.d(4): Error: cannot implicitly convert expression (__lambda1) of type int delegate() nothrow @safe to int delegate() pure
Comment #1 by k.hara.pg — 2014-09-18T00:58:16Z
*** This issue has been marked as a duplicate of issue 9148 ***