[Issue 8307] inconsistent treatment of auto functions
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Apr 22 17:00:42 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=8307
Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |andrej.mitrovich at gmail.com
Resolution|--- |WORKSFORME
--- Comment #2 from Andrej Mitrovic <andrej.mitrovich at gmail.com> ---
> auto foo(){ return 0; return 0.0; } // ok
Warning: statement is not reachable
> auto bar(int x){ if(x==0) return 0; return bar(x-1)+1; } // error
Error: forward reference to bar
The spec seems correct afaict, unless I'm missing something.
--
More information about the Digitalmars-d-bugs
mailing list