On Thursday, 29 March 2018 at 21:18:02 UTC, Seb wrote:
On Thursday, 29 March 2018 at 20:48:47 UTC, number wrote:
I'm learning, so no idea if this is known or what causes the segfault.

[...]

Always try the latest release when you run into an ICE - chances are very good that it already has been fixed:

https://run.dlang.io/is/OySBGO

There are a couple of bugs here:

---
void main()
{
    { class C { } }
    class C { }
    // C x; x.x=1;
    // static assert (!__traits(compiles, C.x));
}
---

The first bug can be shown by de-commenting the first line and can be easily solved by modifying hdrgen.d by adding a check on t.sym.parent being non-null to the visit(TypeClass) method. Once that's fixed de-comment the second line to have the compiler crash and burn somewhere else.

Reply via email to