[fpc-pascal] Re: Correct way for partial generic specialization
Sven Barth
pascaldragon at googlemail.com
Wed Apr 17 07:48:14 CEST 2013
Am 17.04.2013 02:11 schrieb "leledumbo" <leledumbo_cool at yahoo.co.id>:
> > One can argue however that the following should be valid as well (AFAIK
it
> > is not currently):
>
> Yes, this is my original question. Let me rephrase:
>
> Having this declaration:
>
> type
> generic TType1<A,B> = class end;
>
> Why the following is not valid:
>
> generic TType2 = specialize TType1<A,String>;
You're missing the <A> again. :)
> but this one is:
>
> generic TType2 = class(specialize TType1<A,String>) end;
>
> ?
>
> Is it possible to do partial generic specialization without the need of
> inheritance?
Not currently. It might be a useful extension however. I'll need to test
what Delphi says about this...
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130417/d2b60a7b/attachment.html>
More information about the fpc-pascal
mailing list