www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9973] New: ICE for selective import in compiler generated try finally body

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: code dawg.eu



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: -------
Apr 21 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9973


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE



The root cause was just same as bug 10049. So the bug is now fixed in 2.063a.

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

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