On Sun, Mar 17, 2013 at 2:10 PM, Sven Barth <pascaldra...@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 _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal