Bug 5734 – foreach on enum associative array

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2011-03-14T10:49:00Z
Last change time
2011-03-14T16:33:10Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2011-03-14T10:49:50Z
A problem found by Nebster. This D2 code: enum int[int] aa = [0: 1]; void main() { foreach (k; aa) {} foreach (k; aa.keys) {} foreach (k; aa.values) {} foreach (k; aa.byKey()) {} foreach (k; aa.byValue()) {} } DMD 2.052 gives: Internal error: e2ir.c 4835
Comment #1 by kennytm — 2011-03-14T16:33:10Z
*** This issue has been marked as a duplicate of issue 5590 ***