[Issue 9050] New: compiler crash on return type inference
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 20 08:41:12 PST 2012
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: nobody at puremagic.com
ReportedBy: Marco.Leise at gmx.de
--- Comment #0 from Marco Leise <Marco.Leise at 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: -------
More information about the Digitalmars-d-bugs
mailing list