Bug 8089 – Importing package as module causes segfault
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-05-11T23:48:00Z
Last change time
2015-06-09T05:15:19Z
Keywords
ice, pull
Assigned to
nobody
Creator
issues.dlang
Comments
Comment #0 by issues.dlang — 2012-05-11T23:48:23Z
I decide that I'd look at the possibility of implementing something along the lines of DIP 15 or 16 and ran into this little bit of fun. If you have the modules
prog.d
------
import wasmodule;
void main() {}
------
and
wasmodule/module1.d
-------------------
module wasmodule.module1;
-------------------
you get a segfault. If you change the first import to
import wasmodule.module1;
it's fine. Apparently the compiler can't handle trying to import a package as if it were module (obviously, it should error out in that case, but segfaulting is clearly not acceptable).