[fpc-pascal] Class/Record helpers on genericd?
pascaldragon at googlemail.com
Tue Apr 26 07:57:11 CEST 2016
Am 25.04.2016 22:44 schrieb "Anthony Walter" <sysrpl at gmail.com>:
> Correct me if I'm wrong, but didn't you add support for class/record
helpers on generics? For example I'd like to be able to add methods to
> TArray<T> = array of <T>;
> TCompare<T> = function(constref A, B: T): Integer;
> TArrayHelper<T> = record helper for TArray<T>
> procedure Sort(Compare: TCompare);
> function First: T;
> function Last: T;
> function Random: T;
> // and so on
> As it is right now the compiler will not allow this.
No, I did not and it's also not planned.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal