Applies to most arithmetic operations. static assert(-undefined); bug.d(4): Error: undefined identifier undefined bug.d(4): Error: static assert (-(__error)) is false It's because typeCombine overwrites its subexpressions with ErrorExp.
https://github.com/D-Programming-Language/dmd/commit/746d98fb0daacbd6a9efab1da6aacd2d7b55b39f https://github.com/D-Programming-Language/dmd/commit/0051ed8ea86472083ed205a4857399d1f8defd71