E2475 '%s' directive not allowed in record helper type (Delphi)

From RAD Studio
Jump to: navigation, search

Go Up to Error and Warning Messages (Delphi)

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.