Delphi Error – E2250 There is no overloaded version of ‘%s’ that can be called with these arguments

Delphi Compiler Error

E2250 There is no overloaded version of ‘%s’ that can be called with these arguments

Reason for the Error & Solution

An attempt has been made to call an overloaded function that cannot be resolved with the current set of overloads.

program Produce;

procedure f0(a : integer); overload;
begin
end;

procedure f0(a : char); overload;
begin
end;

begin
  f0(1.2);
end.


The overloaded procedure f0 has two versions: one which takes a char and one which takes an integer. However, the call to f0 uses a floating point type, which the compiler cannot resolve into neither a char nor an integer.

program Solve;

procedure f0(a : integer); overload;
begin
end;

procedure f0(a : char); overload;
begin
end;

begin
  f0(1);
end.

You can solve this problem in two ways: either supply a parameter type which can be resolved into a match of an overloaded procedure, or create a new version of the overloaded procedure which matches the parameter type.

In the example above, the parameter type has been modified to match one of the existing overloaded versions of f0.

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

Delphi Compiler Error E2313 Attribute – Known attribute cannot specify properties Reason for the Error & Solution No further information...
Delphi Compiler Error E2379 Virtual methods not allowed in record types Reason for the Error & Solution No further information...
Rodrigo , one of the long time Delphi Developer has been working on one of his personal project “Delphi IDE...