Summary: auto return: forward ref error when using it with
                    recursive functions
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2010-11-29 03:21:53 PST ---
auto x(int z) {
    if (z == 1) {
        return x(z);  //line 3
    } else {
        return z;     //line 5

z.d(3): Error: forward reference to x
z.d(5): Error: mismatched function return type inference of int and _error_

It works when you switch line 3 and 5.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to