Delphi Compiler Error
E2475 ‘%s’ directive not allowed in record helper type
Reason for the Error & Solution
This happens when using directives that are not allowed for records in helper methods for those records.
program E2475;
{$APPTYPE CONSOLE}
uses
SysUtils;
type
aRec = record
end;
aRecHelper = record helper for aRec
function IsBool: Boolean; override; //E2475 Fix : use classes instead
// do not use the override directive
end;
function aRecHelper.IsBool: Boolean;
begin
//
end;
begin
//
end.