November 08 [Issue 24848] New: bad parser diagnostic for a partial MulExp | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24848 Issue ID: 24848 Summary: bad parser diagnostic for a partial MulExp Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: diagnostic Severity: minor Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: b2.temp@gmx.com given the wrong code: ``` module runnable; void main() { struct A1 {} if (A1*) {} return; } ``` you get the error messages > /tmp/temp_7FA97E5E13D0.d(6,12): Error: expression expected, not `)`> > /tmp/temp_7FA97E5E13D0.d(6,14): Error: missing closing `)` after `if (A1 * 0` The second message is very bad. First it does not output the input. In no way we multiply by zero. Second the closing right paren is there. -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply