http://d.puremagic.com/issues/show_bug.cgi?id=4090
bearophile_h...@eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #15 from bearophile_h...@eml.cc 2012-11-07 04:47:43 PST --- Now this code: void main() { int[] array = [10, 20, 30]; foreach (const i, x; array) i++; foreach (immutable i, x; array) i++; } Gives: test.d(3): Warning: variable modified in foreach body requires ref storage class test.d(3): Error: cannot modify const expression i test.d(4): Warning: variable modified in foreach body requires ref storage class test.d(4): Error: cannot modify immutable expression i Why is it giving both the warning and the error? Closed again. Thank you Hara and others. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------