[Issue 3922] Refuse returning nonvoid from void functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 6 04:59:57 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=3922



--- Comment #12 from Trass3r <mrmocool at gmx.de> 2012-01-06 04:59:49 PST ---
(In reply to comment #10)
> This is required for forwarding and cannot change.
> 
> auto foo(T...)(T args){return bar(args);}

Well couldn't this special case be checked?
Accidentally turning the return type into void or forgetting to change the type
from void after you added a return x; is much more common than such code imho.
Also should a function returning something or not really depend on argument
types?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list