RAD Studio (Common)
ContentsIndex
PreviousUpNext
E2273: No overloaded version of '%s' with this parameter list exists (Delphi)

An attempt has been made to call an overloaded procedure but no suitable match could be found.

program overload;
  procedure f(x : Char); overload;
  begin
  end;

  procedure f(x : Integer); overload;
  begin
  end;

begin
  f(1.0);

end.

In the use of f presented here, the compiler is unable to find a suitable match (using the type compatibility & overloading rules) given the actual parameter 1.0.


program overload;
  procedure f(x : char); overload;
  begin
  end;

  procedure f(x : integer); overload;
  begin
  end;

begin
  f(1);
end.

Here, the call to f has been changed to pass an integer as the actual parameter which will allow the compiler to find a suitable match. Another approach to solving this problem would be to introduce a new procedure which takes a floating point parameter.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!