[Issue 7483] New: Can't recursively call function with auto return

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Feb 11 10:59:18 PST 2012


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

           Summary: Can't recursively call function with auto return
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-02-11 10:59:16 PST ---
module test;

auto test(int x)
{
    return test(1);
}

void main()
{
}

test.d(5): Error: forward reference to test

I was using tuple() returns and ran into this. Luckily I can work around it by
explicitly setting the return type, e.g. "Tuple!(bool, string, string) foo()".

-- 
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