http://d.puremagic.com/issues/show_bug.cgi?id=5399
Summary: Return the result of a nonvoid function in a void function Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------