A wrong program (it misses a like where A and B enums are defined): enum uint foo = A | B; enum uint[] bar = [foo]; void main() {} DMD 2.057head gives: Assertion failure: '0' on line 1853 in file 'expression.c'
foo's initializer is evaluated once with errors gagged for the foo declaration, then again when it's used in bar's declaration. The type ends up full of errors, but the error count is never incremented. I don't really understand why it's doing this, and the correct place to run (or re-run) semantic ungagged is unclear. The comment at 1411 in declaration.c doesn't really help, and the code is ancient.
This one gives correct compilation messages on 2.059: PS E:\DigitalMars\dmd2\samples> rdmd bug bug.d(1): Error: undefined identifier A bug.d(1): Error: undefined identifier B
(In reply to comment #2) > This one gives correct compilation messages on 2.059: > > PS E:\DigitalMars\dmd2\samples> rdmd bug > bug.d(1): Error: undefined identifier A > bug.d(1): Error: undefined identifier B This was probably fixed as part of the issue 4269 gagging changes. Please feel free to close bugs if you can verify they work with current D1 and D2 compilers.