Delphi Compiler Error
E2520 Result type of operator ‘%s’ must be Boolean type
Reason for the Error & Solution
This occurs when the return type is expected to be Boolean but it’s not.
program E2520;
{E2517 Operator '%s' must take %d parameter(s)}
{$APPTYPE CONSOLE}
uses
SysUtils;
type
TGenRec = record
class operator False( b: TGenRec): integer; //E2520
end;
begin
end.