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.