www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6943] New: Internal error: e2ir.c 4728 when doing get() on AA literal

reply d-bugmail puremagic.com writes:
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: nobody puremagic.com
        ReportedBy: xtzgzorex gmail.com



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: -------
Nov 13 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6943


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |DUPLICATE



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

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