https://issues.dlang.org/show_bug.cgi?id=16118
Issue ID: 16118
Summary: ICE on double import erroneous file
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
It's an ICE on bad code.
File c.d :
```
struct {
enum E = 1;
}
```
File a.d :
```
struct C {
import c;
}
struct B(T...) {
import c;
}
B!1 bbb;
```
Compiling a.d crashes DMD 2.071.
> dmd a.d
c.d(1): Error: anonymous struct can only be a part of an aggregate, not module
c
[1] 2913 segmentation fault dmd a.d
--