HomeDelphiDelphi Error – E2254 Overloaded procedure ‘%s’ must be marked with the ‘overload’ directive

Delphi Error – E2254 Overloaded procedure ‘%s’ must be marked with the ‘overload’ directive

Delphi Compiler Error

E2254 Overloaded procedure ‘%s’ must be marked with the ‘overload’ directive

Reason for the Error & Solution

The compiler has encountered a procedure, which is not marked overload, with the same name as a procedure already marked overload. All overloaded procedures must be marked as such.

program Produce;

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

procedure f0(a : integer; ch : char);
begin
end;

begin
end.

The procedure f0(a : integer; ch : char) causes the error since it is not marked with the overload keyword.

program solve;

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

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

begin
end.


If the procedure is intended to be an overloaded version, then mark it as overload. If it is not intended to be an overloaded version, then change its name.

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...