https://issues.dlang.org/show_bug.cgi?id=20710

          Issue ID: 20710
           Summary: ICE when statically accessing struct member containing
                    empty array
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

```
immutable A a = A(B([]));
immutable B b = a.b;

struct A {
        B b;
}

struct B {
        int[] c;
}
```

Compiling this code with `dmd app.d` results in:

`app.d(2): Error: Internal Compiler Error: null field b`

Tested with DMD v2.091.0 .

--

Reply via email to