December 26, 2012 [Issue 9212] New: Associative array foreach iteration with immutable key | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=9212 Summary: Associative array foreach iteration with immutable key Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 2012-12-26 15:02:57 PST --- I think this code should be accepted: void main() { int[int] aa; foreach (const key, val; aa) {} } DMD 2.061alpha gives: test.d(3): Error: foreach: index must be type int, not const(int) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation