Bug 9973 – ICE for selective import in compiler generated try finally body
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-04-21T05:04:00Z
Last change time
2013-05-13T05:38:07Z
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2013-04-21T05:04:54Z
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.
Comment #1 by k.hara.pg — 2013-05-13T05:38:07Z
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 ***