dlang forum: https://forum.dlang.org/post/qlmvefrlyykojtczecib@forum.dlang.org snippet https://run.dlang.io/is/OySBGO the provoking line is commented out in that snippet. when commented in, all compilers give the segfault, including ldc ones. except for 'all dmd compilers..' with version <= 2.066.0 post by LiNbO3 might give more details > > 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.
The code does not segfault anymore in git HEAD. Closing as fixed.