do D support something like C# 4.0 co/contra-variance?
Nick Sabalausky
a at a.a
Thu Sep 2 12:16:58 PDT 2010
"Olivier Pisano" <olivier.pisano at laposte.net> wrote in message
news:i5oq50$1i0r$1 at 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.
More information about the Digitalmars-d
mailing list