By fixing bug 5750, the calcLazy should be inferred as pure, but it doesn't. T calcLazy(T)(lazy T n) { return n; } int purefunc() pure { return calcLazy(1); // test.d(8): Error: pure function 'purefunc' cannot call impure function 'calcLazy' } void main() { auto n = purefunc(); }
https://github.com/D-Programming-Language/dmd/pull/388
https://github.com/D-Programming-Language/dmd/commit/74a94cfb9347164ade633973105aeda1d96a2998