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


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugd...@yahoo.com.au


--- Comment #4 from Don <clugd...@yahoo.com.au> 2009-11-05 21:42:48 PST ---
(In reply to comment #2)
> You should change the spec in this case:
> 
> http://www.digitalmars.com/d/1.0/statement.html
> 
> 
> "Expression is allowed even if the function specifies a void return type. The
> Expression will be evaluated, but nothing will be returned."

It's still true. This works, for example:

void foo() {
   return bar();
}

It's exactly the same as:   { bar(); return; } which is OK.

Likewise, return 0; becomes  { 0; return; } which is generating the "no effect"
error.

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

Reply via email to