[Issue 5288] auto return: forward ref error when using it with recursive functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 4 11:58:05 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5288


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc


--- Comment #2 from bearophile_hugs at eml.cc 2011-04-04 11:54:27 PDT ---
(In reply to comment #1)
> This one is a little hard to fix, because the semantic analysis for function
> bodies goes statement by statement in a forward manner.

This is a nice bug report, and to solve this kind of code the D compiler
probably needs a little more powerful type inference. If you are able to do
this improvement with a reasonable amount of work and code, then it's OK.
Otherwise an option it to mark this with WONTFIX to keep the D compiler
simpler. A better type inferencer may require more compilation time and a
bigger compiler.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list