[fpc-devel] Is that supposed to work: property with "[var index: TFoo]" ?
Sven Barth
pascaldragon at googlemail.com
Fri Jun 28 07:35:17 CEST 2019
Am 28.06.2019 um 00:00 schrieb Ryan Joseph:
>
>> On Jun 27, 2019, at 5:57 PM, Sven Barth via fpc-devel <fpc-devel at lists.freepascal.org> wrote:
>>
>> If it's a bug (what I do indeed think of this and the other bug you mentioned) it's considered acceptable to break backwards compatibility. After all we wouldn't be able to fix essentially anything as some code out there might rely on the behavior.
>>
> Did you see the other users note in my bug report? Looks like this:
>
> tINIFile = object
> private
> procedure SetAsText( akey:PAnsiChar;val:PAnsiChar); overload;
> procedure SetAsText( asection,akey:PAnsiChar;val:PAnsiChar); overload;
> procedure SetAsText(ans,asection,akey:PAnsiChar;val:PAnsiChar); overload;
>
> function GetAsText( akey:PAnsiChar):PAnsiChar; overload;
> function GetAsText( asection,akey:PAnsiChar):PAnsiChar; overload;
> function GetAsText(ans,asection,akey:PAnsiChar):PAnsiChar; overload;
> public
> property Value [ans:PAnsiChar; asection:PAnsiChar; akey:PAnsiChar]:PAnsiChar
> read GetAsText write SetAsText; default;
> end;
>
> ====================
>
> Try it and play around but it works to call value with variable number of parameters.
>
> Does that mean 2 bugs with properties then? allowing var and out in properties seems wrong also.
That's what I meant with "the other bug you mentioned".
Regards,
Sven
More information about the fpc-devel
mailing list