"Olivier Pisano" <olivier.pis...@laposte.net> wrote in message news:i5oq50$1i0...@digitalmars.com... > Le 02/09/2010 13:38, bearophile a écrit : >> dennis: >>> http://blog.t-l-k.com/dot-net/2009/c-sharp-4-covariance-and-contravariance >> >> I think D2 doesn't support those things yes. But they are useful and may >> be added to D3. >> >> Bye, >> bearophile > > I was sure D did support covariance for the return types of overriden > methods. >
The OP was talking about this: class TemplClass(T) {} class Base {} class Derived : Base {} And then having some way to have TemplClass!Derived considered to be derived from TemplClass!Base, or the other way around.