D - [bug] Recursive template with new style syntax
- Roel Mathys (42/42) Jan 31 2004 I guess the "new" style syntax for templates should accept the same
I guess the "new" style syntax for templates should accept the same constructs as when using it with the template keyword. This code does not compile with DMD0.79, I marked the offending line. bye, roel // --------------------------------------------- class Nil {} template TL(T1) { class Impl(T1) { alias T1 Head; alias Nil Tail; } } template TL(T1,T2) { class Impl(T1) { alias T1 Head; alias TL!(T2) Tail; } } class Impl(T1) { alias T1 Head; alias Nil Tail; } class Impl(T1,T2) { alias T1 Head; alias Impl!(T2) Tail; } alias TL!(int).Impl TL1a; alias TL!(int,uint).Impl TL1b; // compiler accepts this alias Impl!(int) TL2a; alias Impl!(int,uint) TL2b; // <-- offending line // compiler does not accept this int main() { return 0; }
Jan 31 2004