[fpc-pascal] a proposal about "with" syntax
Flávio Etrusco
flavio.etrusco at gmail.com
Mon Mar 18 01:18:28 CET 2013
On Sun, Mar 17, 2013 at 2:10 PM, Sven Barth <pascaldragon at googlemail.com> wrote:
> On 17.03.2013 15:33, Flávio Etrusco wrote:
>>
>> (...)
>> static <T extends Comparable> int IndexOf(List<T> p_list, T p_item);
>
>
> So you're basically just talking about generic methods here?
Yes. Or actually not, it also involves allowing
non-specialized/not-completely-defined variables.
> The Delphi
> compatible syntax for your two examples are:
>
> === code begin ===
>
> function Alias1<T: TObject>(Source: T): TAlias1<T>;
>
> === code end ===
This time I tried with 2.7.1 :)
But it also gives "Error: Generics without specialization cannot be
used as a type for a variable".
Is something planned regarding this case?
Thanks a lot.
-Flávio
More information about the fpc-pascal
mailing list