D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7639 - Undefined enum AA key crashes compiler
Summary: Undefined enum AA key crashes compiler
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: ice
Depends on:
Blocks:
 
Reported: 2012-03-03 18:00 UTC by Andrej Mitrovic
Modified: 2012-03-30 21:30 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 2012-03-03 18:00:30 UTC
// enum str = "";  // comment out to avoid crash

void main()
{
    enum foo = 
    [
        str : "functions",
    ];
}

When 'auto' is used it doesn't crash the compiler but gives a nice error message:
Error: undefined identifier str
Comment 1 github-bugzilla 2012-03-30 19:53:33 UTC
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/651c27363d05e6038792e0aa717682929385d007
Merge pull request #852 from donc/segfault7639

Fix issue 7639 Undefined enum AA key crashes compiler