Comment #0 by matti.niemenmaa+dbugzilla — 2006-11-18T12:52:08Z
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.
Comment #1 by davidl — 2007-06-12T11:15:28Z
Fixed at least in dmd 1.014
earlier version not tested yet