Each of the following unions give the same error: arst.d(1): Error: union arst.X overlapping initialization for struct X.y arst.d(5): Error: union arst.Y overlapping initialization for struct Y.y arst.d(9): Error: union arst.Z overlapping initialization for struct Z.y union X { int x = void; int y = void; } union Y { int x = void; int y = 0; } union Z { int x = 0; int y = void; } Removing the "= void", these unions compile (except, for some reason, Y, but that's a separate issue).
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e8a53272d3d3406b36fdf7caff61f79e888c708c fix Issue 3991 - Void initializers in unions considered overlapping
Worksforme in D2 with test case, and D1 is not supported anymore.