What    |Removed                     |Added
           Severity|normal                      |enhancement

--- Comment #1 from 2011-01-01 23:00:02 PST ---
This isn't a bug, I was wrong. D2 specs clearly show this is working as

    return Expression ;

Expression is allowed even if the function specifies a void return type. The
Expression will be evaluated, but nothing will be returned. If the Expression
has no side effects, and the return type is void, then it is illegal.

Indeed, this too compiles:

void main() {
    int x;
    return x++;

But this is a potentially dangerous corner case in the return rules.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to