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: [email protected]
Reporter: [email protected]
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.
--