http://d.puremagic.com/issues/show_bug.cgi?id=6169
--- Comment #11 from yebblies <[email protected]> 2013-05-11 20:51:44 EST --- (In reply to comment #10) > > 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() That appears to be correct. While both 'foo' and 'bar' are running at compile time, they are in different compile time evaluation contexts. The evaluation of 'y' _must_ be independent of the running of 'foo'. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
