[Issue 19762] New: ICE on invalid code
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Tue Mar 26 09:36:22 UTC 2019
    
    
  
https://issues.dlang.org/show_bug.cgi?id=19762
          Issue ID: 19762
           Summary: ICE on invalid code
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: elpenguino+D at gmail.com
I couldn't get this down to less than 3 separate modules, and I can't even
guess which part of this is causing the crash.
Compile with -g.
a.d:
```
module a;
struct X {
        import b : Baz;
        Err err;
}
```
b.d:
```
module b;
struct Baz {
}
struct Qux {
        import c;
}
```
c.d:
```
module c;
struct Foo {
        import a : X;
        X[] x;
}
Nullable!Foo foo() {
        Nullable!Foo output;
        return output;
}
struct Nullable(T)
{
    bool opEquals(U)(const(U) rhs) const
    if (is(typeof(this.get == rhs)))
    {
        return true;
    }
    inout(T) get() inout
    {
        return T.init;
    }
}
```
--
    
    
More information about the Digitalmars-d-bugs
mailing list