Summary: Return the result of a nonvoid function in a void
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2011-01-01 13:49:57 PST ---
In D (rightly) you can't return a value different from void inside a void
function. But this code compiles and runs with no errors in DMD 2.051 (bug
found by Daren Scot Wilson):

int foo() { return 1; }
void main() {
    return foo();

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

Reply via email to