Hi,

Delphi mode, fpc 3.0.0

I have a Sort method:

type

  TArray<T> = class

class procedure Sort(var Values: array of T; const Comparer: IComparer<T>);

  end;

If I call Sort with some real type it compiles and works:

TArray<T>.Sort(string,comparer);

but if i call it from another generic type - it does not compile:

class procedure Arrays<T>.sort(var arr: array of T; const Comparer: IComparer<T>);

begin

TArray<T>.Sort(arr,comparer);

end;

Fatal: Syntax error, "CREATE" expected but "SORT" found

Anything I can do to make it compile?

Should I try objfp mode?

Thanks,

Gennady



_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to