Bug 6943 – Internal error: e2ir.c 4728 when doing get() on AA literal
Status
RESOLVED
Resolution
DUPLICATE
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-11-13T04:55:00Z
Last change time
2011-12-12T22:16:38Z
Assigned to
nobody
Creator
alex
Comments
Comment #0 by alex — 2011-11-13T04:55:54Z
Consider the following code:
enum MyEnum
{
foo,
bar,
baz,
}
void main()
{
auto foo = [MyEnum.foo : 'o',
MyEnum.bar : 'r',
MyEnum.baz : 'z'];
auto val = foo.get(MyEnum.bar, 'r'); // Works fine.
auto val2 = [MyEnum.foo : 'o',
MyEnum.bar : 'r',
MyEnum.baz : 'z'].get(MyEnum.baz, 'z'); // Breaks.
}
For some reason, the compiler seems to explode when doing get() directly on an AA literal.
Comment #1 by yebblies — 2011-12-12T22:16:38Z
*** This issue has been marked as a duplicate of issue 5675 ***