https://issues.dlang.org/show_bug.cgi?id=22472
Issue ID: 22472
Summary: Invalid error message for `void` return from
non-`void` functions
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
======================================================
void doStuff();
int foo()
{
return doStuff();
}
======================================================
Error: `return` expression expected
The error message indicates that there was no expression, despite there being a
`void` one.
The previous message was more useful but changed after 2.066.0:
Error: cannot implicitly convert expression (doStuff()) of type void to int
--