[Issue 9973] New: ICE for selective import in compiler generated try finally body

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 21 05:04:55 PDT 2013


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

           Summary: ICE for selective import in compiler generated try
                    finally body
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: code at dawg.eu


--- Comment #0 from Martin Nowak <code at dawg.eu> 2013-04-21 05:04:54 PDT ---
cat > bug.d << CODE
struct WithDestructor
{
    ~this()
    {
    }
}

void bug()
{
    for (auto val = WithDestructor();;)
    {
        import object : Object; // any selective import
    }
}
CODE

dmd -c bug

----

Not sure why, but semantic on the ImportStatement is run twice.
On the second pass it will add duplicated AliasDeclarations for the
selective imports. Later this causes an array bounds error.

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


More information about the Digitalmars-d-bugs mailing list