[Issue 20710] New: ICE when statically accessing struct member containing empty array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 31 03:45:05 UTC 2020


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: nobody at puremagic.com
          Reporter: andy.pj.hanson at gmail.com

```
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 .

--


More information about the Digitalmars-d-bugs mailing list