> On Jun 28, 2019, at 1:39 AM, Sven Barth via fpc-devel > <fpc-devel@lists.freepascal.org> wrote: > > I just tested with Delphi and it works there as well. So contrary to what we > thought this does not seem to be a bug...
I think it’s still buggy. Why does this compile? I guess it would make sense if the property didn’t have any parameters and just mapped to any of the overloaded functions but with the parameters it doesn’t make any sense. I submitted my patch for multiple default properties (https://bugs.freepascal.org/view.php?id=35772) which is a more sane solution than allowing this: program test; type tINIFile = object private function GetAsText( akey:integer):PAnsiChar; overload; function GetAsText(ans,asection,akey:PAnsiChar):PAnsiChar; overload; public property Value [ans:PAnsiChar; asection:PAnsiChar; akey:PAnsiChar]:PAnsiChar read GetAsText; default; end; function tINIFile.GetAsText( akey:integer):PAnsiChar; begin end; function tINIFile.GetAsText(ans,asection,akey:PAnsiChar):PAnsiChar; begin end; var o: tINIFile; s: PAnsiChar; begin s := o[1]; s := o['a','b','c']; end. Regards, Ryan Joseph _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel