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

           Summary: compiler crash on return type inference
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: marco.le...@gmx.de


--- Comment #0 from Marco Leise <marco.le...@gmx.de> 2012-11-20 08:41:10 PST ---
This is probably some variation of some other bug, but it is hard to tell for
me. In the example below there is a recursive instantiation of foo, A and B. It
takes both calls to foo and the pure attribute to make the compiler crash.
Otherwise it prints:
test.d(4): Error: forward reference to inferred return type of function call
foo(A())
test.d(8): Error: template instance test.B!(int) error instantiating
test.d(10):        instantiated from here: foo!()



struct A(T) {}
struct B(T) {
    unittest {
        foo(A!int());
    }
}
auto foo()(A!int base) pure {
    return B!int();
}
auto l = foo(A!int());

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

Reply via email to