July 31, 2004
I suspect this bug is on the to-do scroll, but I'll mention it

module test;

void main ()
{
}

class A(T)
{
}

class B (T, S: A!(T))
{
}

>dmd test.d
"test.d(7): identifier 'T' is not defined"

The compiler is okay with "S: T", "S = T" and "S: T = T".

XP DMD 0.97


July 31, 2004
Bent Rasmussen wrote:

> I suspect this bug is on the to-do scroll, but I'll mention it
> 
> module test;
> 
> void main ()
> {
> }
> 
> class A(T)
> {
> }
> 
> class B (T, S: A!(T))
> {
> }
> 
> 
>>dmd test.d
> 
> "test.d(7): identifier 'T' is not defined"

This raises the interesting issue of template template parameters, but in the above example you don't actually need the second template parameter at all.


Sean