On Sun, Mar 17, 2013 at 6:59 AM, Sven Barth <pascaldra...@googlemail.com> wrote: > On 17.03.2013 06:00, Flávio Etrusco wrote: >> >> type generic TAlias1<T: TObject> = class(TObject) >> function Alias1: T; >> end; > > This already works.
In 2.7 I assume, because it doesn't work in 2.6.2. Great anyway :) >> function<T: TObject> Alias1(Source: T): TAlias1<T>; > > I don't really get what you want to express with that... This is a Java a construction, I don't know whether it exists in other languages. In Java you specify it before the result type. It means the parameterized result is be based on the parameter it receives. You can also "bind" several parameters: static <T extends Comparable> int IndexOf(List<T> p_list, T p_item); -Flávio _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal