digitalmars.D.bugs - [Issue 8111] New: [ICE] With templated recursive return-inferred function
- d-bugmail puremagic.com (35/35) May 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8111
- d-bugmail puremagic.com (10/10) Jan 16 2013 http://d.puremagic.com/issues/show_bug.cgi?id=8111
- d-bugmail puremagic.com (16/16) Jan 16 2013 http://d.puremagic.com/issues/show_bug.cgi?id=8111
http://d.puremagic.com/issues/show_bug.cgi?id=8111 Summary: [ICE] With templated recursive return-inferred function Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc --- Comment #0 from bearophile_hugs eml.cc 2012-05-17 02:30:57 PDT --- Crashes DMD 2.060alpha: class Foo(T) { Foo n; } auto bar(T)(Foo!T t) pure { return t ? bar(t.n) : []; } void main() { bar!int(null); } Replacing "auto" with "T[]" it compiles. Maybe it's caused by a forward reference bug. Removing "pure" it gives: test.d(5): Error: forward reference to inferred return type of function call bar(t.n) test.d(8): Error: template instance test.bar!(int) error instantiating test.d(8): Error: forward reference to bar -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 17 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8111 yebblies <yebblies gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yebblies gmail.com --- Comment #1 from yebblies <yebblies gmail.com> 2013-01-17 02:18:24 EST --- No ice with 2.062 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 16 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8111 bearophile_hugs eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME --- Comment #2 from bearophile_hugs eml.cc 2013-01-16 10:13:07 PST --- Now it gives: temp.d(5): Error: forward reference to inferred return type of function call bar(t.n) temp.d(8): Error: template instance temp.bar!(int) error instantiating temp.d(8): Error: forward reference to bar Closed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 16 2013