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

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 X2421 Imported identifier ‘%s’ conflicts with ‘%s’ in ‘%s’ Reason for the Error & Solution This occurs...
Delphi Compiler Error X2367 Case of property accessor method %s.%s should be %s.%s Reason for the Error & Solution No...
Delphi Compiler Error X2269 Overriding virtual method ‘%s.%s’ has lower visibility (%s) than base class ‘%s’ (%s) Reason for the...