[fpc-devel] [] property overloads
Ryan Joseph
genericptr at gmail.com
Mon Jul 1 17:38:31 CEST 2019
> On Jul 1, 2019, at 7:56 AM, Ondrej Pokorny <lazarus at kluug.net> wrote:
>
> type
> TValue = record A: Integer end;
> TMyClass = class
> function GetValue(index: integer): TValue;
> function GetValue(index: string): TValue;
> property Index[aindex: integer]: TValue read GetValue; default;
> end;
And btw what was decided about the syntax? I think it was determined it was valid in Delphi but is it going to be allowed in ObjFPC mode? If that’s how Delphi does it I don’t see why they allow the [] to contain any parameters at all since they don’t map to anything.
Regards,
Ryan Joseph
More information about the fpc-devel
mailing list