Bug 10405 – redundant "expression has no effect" error when returning non-void in void function
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-18T08:31:00Z
Last change time
2013-06-19T05:35:11Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
henning
Comments
Comment #0 by henning — 2013-06-18T08:31:38Z
void main() {
return 10;
}
-------
main.d(2): Error: long has no effect in expression (10)
main.d(2): Error: cannot return non-void from void function
-------