On Wed, 10 Apr 2019, Ryan Joseph wrote:
Is this a bug or intended behavior? I can call it like Test.DoThis but it seems
like overloading should work.
{$mode objfpc}
program test;
type
THelper = class helper for TObject
procedure DoThis; overload;
end;
procedure DoThis (param: string); overload;
begin
end;
procedure THelper.DoThis;
begin
DoThis('string'); // <——— ERROR: Wrong number of parameters specified for call to
"DoThis"
end;
begin
end.
As far as I know, in a method "overload" only means it checks higher up the
inheritance
chain. Delphi gives the same error.
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal