http://d.puremagic.com/issues/show_bug.cgi?id=6943

           Summary: Internal error: e2ir.c 4728 when doing get() on AA
                    literal
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: xtzgzo...@gmail.com


--- Comment #0 from Alex R�nne Petersen <xtzgzo...@gmail.com> 2011-11-13 
04:55:54 PST ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to