[typing] Type-erasure re generics

Pelle pelle.mansson at gmail.com
Wed Sep 29 10:18:17 PDT 2010


On 09/29/2010 05:53 PM, Jesse Phillips wrote:
> The only benefit, which should be solve in another manner is having this code work:
>
> class A {}
> class B:A {}
>
> class Container(T) {}
>
> void main() {
>      Container!(A) a = new Container!(B)();
> }

Sorry for falling off topic, but that code shouldn't work.

a.insert(new A)


More information about the Digitalmars-d mailing list