www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Template BUG DMD 0.100

DMD 0.100 winXP

can someone explain why this does not work (actually a more verbose
version does work)

I had been trying to write a simple example to show that (T : Object)
only matches classes whose super class explicitly inherit from Object
and then it all went pear shaped!

class Works( T : Object ) : Object { public this() { } }
class Aok : Works!( Aok ) { }

//ot01.d(3): template instance Works!(...) does not match any template
// ot01.d(3): Works!(...) is used as a type
Aug 22 2004