digitalmars.D.bugs - [Issue 810] New: Cannot forward reference template
- d-bugmail puremagic.com (19/19) Jan 07 2007 http://d.puremagic.com/issues/show_bug.cgi?id=810
- d-bugmail puremagic.com (6/6) Apr 05 2007 http://d.puremagic.com/issues/show_bug.cgi?id=810
- d-bugmail puremagic.com (16/16) Aug 19 2009 http://d.puremagic.com/issues/show_bug.cgi?id=810
- d-bugmail puremagic.com (10/10) Aug 19 2009 http://d.puremagic.com/issues/show_bug.cgi?id=810
http://d.puremagic.com/issues/show_bug.cgi?id=810 Summary: Cannot forward reference template Product: D Version: 1.00 Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P3 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: deewiant gmail.com OtherBugsDependingO 340 nThis: They don't get much shorter than this: Template!(int) stack; template Template(T) {} Flip the two lines and the code compiles. --
Jan 07 2007
http://d.puremagic.com/issues/show_bug.cgi?id=810 Added to DStress as http://dstress.kuehne.cn/compile/f/forward_reference_18_C.d http://dstress.kuehne.cn/compile/f/forward_reference_18_D.d --
Apr 05 2007
http://d.puremagic.com/issues/show_bug.cgi?id=810 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |clugdbug yahoo.com.au Resolution| |FIXED This test case is faulty (as are the Dstress cases), it should be: Template!(int) stack; template Template(T) { alias int Template; } This failed in 1.041, but is working in 1.046 and 2.031. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 19 2009
http://d.puremagic.com/issues/show_bug.cgi?id=810 2009-08-19 09:49:00 PDT --- Right you are; I checked and indeed, flipping the two lines doesn't make the code acceptable even with DMD 1.00. My bad, I presumably changed it from "class" to "template" at the last minute. Confirmed that this is indeed fixed with 1.046: it didn't work in 1.045. Happy -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 19 2009