http://d.puremagic.com/issues/show_bug.cgi?id=6169
--- Comment #10 from [email protected] 2013-05-04 11:11:40 PDT --- (In reply to comment #1) > pure nothrow int foo() { > int x = 1; > nothrow int bar(int y) { // nonpure > x++; > return x + y; > } > > pure nothrow int spam() { > enum z = bar(1); // calls a nonpure > return z; > } > return spam() + spam(); > } > > enum r = foo(); > void main() {} A reduction of that code: int foo() { int x = 0; int bar() { return x; } enum y = bar(); return 0; } enum r = foo(); void main() {} It gives: temp.d(4): Error: variable x cannot be read at compile time temp.d(6): called from here: bar() temp.d(9): called from here: foo() -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
