This is wrong D2 code (there is no foo): void main() { enum int x = 1; pragma(msg, foo!x); } DMD 2.056head gives a partially wrong error message, that contains a "__error": test.d(3): Error: template instance foo!(x) template 'foo' is not defined __error
The "__error" isn't part of the error message. It's coming from the pragma(msg): it's printing foo!x, and that's an error, so it prints "__error". The real bug is that the pragma msg is still displayed, even when an error occurs while evaluating it. Maybe it should give an error of the form: test.d(3): Error: template instance foo!(x) template 'foo' is not defined test.d(3): Error: parameter for pragma(msg) must be a string
https://github.com/D-Programming-Language/dmd/pull/775