[Issue 4090] No foreach type inference with const, ref etc modifiers
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 5 18:56:38 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4090
--- Comment #11 from bearophile_hugs at eml.cc 2012-11-05 18:56:37 PST ---
void main() {
int[] array = [10, 20, 30];
foreach (const i, x; array) {}
foreach (immutable i, x; array) {}
}
It gives:
test.d(3): Error: cannot modify const expression __key5
test.d(4): Error: cannot modify immutable expression __key7
Do you want me to reopen this bug report?
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list