D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5734 - foreach on enum associative array
Summary: foreach on enum associative array
Status: RESOLVED DUPLICATE of issue 5590
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2011-03-14 10:49 UTC by bearophile_hugs
Modified: 2011-03-14 16:33 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2011-03-14 10:49:50 UTC
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 kennytm 2011-03-14 16:33:10 UTC

*** This issue has been marked as a duplicate of issue 5590 ***