October 12 [Issue 24807] New: Error message missing parens for template instance | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24807 Issue ID: 24807 Summary: Error message missing parens for template instance Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: tim.dlang@t-online.de DMD produces a bad error message for the following code: ``` enum E { a,b,c } template X(E e) { static assert(false); } alias Y = X!(E.a); ``` The error message is: ``` test.d(7): Error: static assert: `false` is false test.d(9): instantiated from here: `X!E.a` ``` The code `X!E.a` in the error message is wrong, because it would be parsed as `(X!E).a`. Correct would be `X!(E.a)` -- |
Copyright © 1999-2021 by the D Language Foundation