Re: Template Mixin issue

2009-01-30 Thread Christopher Wright
Christopher Wright wrote: Mike L. wrote: If the compiler can tell that B!(int) is a type, why can't it tell that it is a child class of A!(int) ? This is a bug. In template specializations, : means equality. In static if, : means convertibility. This is only with template specializations in

Re: Template Mixin issue

2009-01-30 Thread Christopher Wright
Mike L. wrote: If the compiler can tell that B!(int) is a type, why can't it tell that it is a child class of A!(int) ? This is a bug. In template specializations, : means equality. In static if, : means convertibility. So, you can use: template ADefaults(Type, AType) { static asser

Template Mixin issue

2009-01-29 Thread Mike L.
Hello, I was wondering why the following does not work: interface A(Type) { Type blah(); } template ADefaults(Type, AType : A!(Type)) { Type blah() { return Type.init; } } class B(Type) : A!(Type) { mixin ADefaults!(Type, B!(Type)); } void main()