[Issue 23983] Better error message when brace missing after `else`
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jun 10 00:09:39 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23983
--- Comment #1 from ryuukk_ <ryuukk.dev at gmail.com> ---
Example 2:
```
void main()
{
int stuff = 0;
version (Poxis)
{
stuff++;
}
else
stuff++;
}
version (Poxis)
{
stuff++;
}
else
{
stuff++;
}
}
```
```
onlineapp.d(15): Error: no identifier for declarator `stuff`
onlineapp.d(15): Error: declaration expected, not `++`
onlineapp.d(19): Error: no identifier for declarator `stuff`
onlineapp.d(19): Error: declaration expected, not `++`
onlineapp.d(21): Error: unmatched closing brace
```
Error message is misleading now
--
More information about the Digitalmars-d-bugs
mailing list