D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6324 - ICE: .values field of enum hash errors out
Summary: ICE: .values field of enum hash errors out
Status: RESOLVED DUPLICATE of issue 5675
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 blocker
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-15 10:12 UTC by Andrej Mitrovic
Modified: 2011-07-16 00:45 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 Andrej Mitrovic 2011-07-15 10:12:14 UTC
DMD 2.054:

enum Foo = [0x01:221, 0x02:227];

void main()
{
    auto foo = Foo.values;
}

Internal error: e2ir.c 4888

This is not a regression. In 2.053 it's: Internal error: e2ir.c 4875.
Comment 1 Andrej Mitrovic 2011-07-15 10:15:41 UTC
Are hashes *ever* going to work at compile-time?

int[string] foo = ["foo":221, "bar":227];

Error: non-constant expression ["foo":221,"bar":227]
Comment 2 yebblies 2011-07-16 00:45:35 UTC

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