E2572 RTTI visibility set constant expression of type System.TRttiVisibility expected (Delphi)

From RAD Studio
Jump to: navigation, search

Go Up to Error and Warning Messages (Delphi)

This occurs when using the $RTTI directive with expressions that are not from System.TRttiVisibility.


program E2572;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  {$RTTI INHERIT METHODS(vtInteger)} //E2572
  TClass1 = class
    A: String;
  end;

  {$RTTI INHERIT FIELDS(vtInteger)} //E2572
  TClass2 = class
    A: String;
  end;

  {$RTTI INHERIT PROPERTIES(vtInteger)} //E2572
  TClass3 = class
    A: String;
  end;
begin

end.