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

           Summary: [ICE](func.c line 1205) with auto return in recursive
                    function
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2012-12-26 03:11:59 PST ---
import std.array: array;
struct Foo(T) { Foo* next; }
auto bar(T)(in Foo!T* x) {
    if (true) return [""];
    return array(bar(x.next));
}
void main () {
    bar!int(null);
}


DMD 2.061alpha gives:

Assertion failure: 'type == f' on line 1205 in file 'func.c'


Replacing "auto" with string[] the code compiles (despite a unrelated statement
is not reachable warning).

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

Reply via email to