[Issue 24848] New: bad parser diagnostic for a partial MulExp
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 8 04:59:45 UTC 2024
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 at puremagic.com
Reporter: b2.temp at 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.
--
More information about the Digitalmars-d-bugs
mailing list