[Issue 2214] No error if void function returns a non-void value

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 10 13:20:08 PDT 2008


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


matti.niemenmaa+dbugzilla at iki.fi changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Comment #2 from matti.niemenmaa+dbugzilla at iki.fi  2008-07-10 15:20 -------
It is in the spec.

http://www.digitalmars.com/d/1.0/statement.html#ReturnStatement

"Expression is allowed even if the function specifies a void return type. The
Expression will be evaluated, but nothing will be returned."


-- 



More information about the Digitalmars-d-bugs mailing list