> On May 1, 2022, at 10:36 AM, Hairy Pixels <[email protected]> wrote:
>
> Not sure what the best solution is but here are the ones I can think of:
>
> 1) allow the helpers to use “array/set of T” syntax.
Sorry for the noise, one last point on this. So it looks like type helpers are
already so strictly typed that a type alias for a dynamic array is not
compatible with the anonymous dynamic array type (see below). Can this
restriction be lifted or is it intentional in the design? I would think that
TIntArray is just an alias and thus should be functionally the same as “array
of integer”.
type
TIntArray = array of integer;
TMyArrayHelper = type helper for TIntArray
procedure DoThis;
end;
procedure TMyArrayHelper.DoThis;
begin
writeln(Length(self));
end;
var
a: array of integer;
begin
a.DoThis; // Illegal qualifier:
end.
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal