digitalmars.D.bugs - [Issue 565] New: Cannot forward reference types within template parameter list
- d-bugmail puremagic.com (32/32) Nov 18 2006 http://d.puremagic.com/issues/show_bug.cgi?id=565
- d-bugmail puremagic.com (10/10) Jun 12 2007 http://d.puremagic.com/issues/show_bug.cgi?id=565
http://d.puremagic.com/issues/show_bug.cgi?id=565 Summary: Cannot forward reference types within template parameter list Product: D Version: 0.174 Platform: PC URL: http://www.digitalmars.com/d/template.html OS/Version: Windows Status: NEW Keywords: rejects-valid, spec Severity: major Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: deewiant gmail.com OtherBugsDependingO 511 nThis: In the spec, under "Argument Deduction", the following example is given: template TBar(D : E*, E) { } alias TBar!(int*, int) Bar3; // (1) E is int // (3) D is int* This does, however, not compile: asdf.d(1): Error: identifier 'E' is not defined asdf.d(1): Error: E is used as a type Another similar example is used later in the same section: class A { } class B : A { } template TBar(T : U*, U : A) { } alias TBar!(B*, B) Foo5; // (2) T is B* // (3) U is B I'd say this is a DMD bug since it's evidently expected to work. --
Nov 18 2006
http://d.puremagic.com/issues/show_bug.cgi?id=565 davidl 126.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Fixed at least in dmd 1.014 earlier version not tested yet --
Jun 12 2007