Occurs when compiling these tests:
github.com/dlang/dmd/tree/master/test/runnable/mixin1.d
github.com/dlang/dmd/tree/master/test/runnable/testrightthis.d
Comment #2 by ibuclaw — 2022-02-20T16:05:22Z
The problem is this line:
https://github.com/dlang/dmd/blob/309f7710f22ef92e767434011c7f44a01d2c5390/src/dmd/statementsem.d#L4823
else if (s.kind() == "static assert" || // kludge, should have isStaticAssert()
`kind()` returns a `const(char)*`, and "static assert" is a string. So it relies on pointer comparison, which only works when statementsem.d and staticassert.d are compiled together in the same compilation unit. i.e: string merging means that both "static assert" strings point to the same area in data.