Jarrett Billingsley Wrote: > On Tue, Jan 20, 2009 at 12:21 PM, Steven Schveighoffer > <[email protected]> wrote: > > So it appears it returns 0 unless you return something else (!) > > Ha!
Yes (but not always), even though specs clearly say that void functions
evaluate return values and discard them.
IIRC, this one returns 0:
void main() {
return new Object();
}
while this one returns an object address:
void foo() { return new Object(); }
void main() {
return foo();
}
