E2562 フィールド識別子は必須です(Delphi)

提供: RAD Studio
移動先: 案内検索

エラーと警告のメッセージ(Delphi) への移動


これが発生するのは、フィールドでないクラス メンバにプロパティを定義した場合です。



program E2562;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  TRec = record
    F: Integer;
    function Func1: Integer;
  end;

function TRec.Func1: Integer;
begin
  Result := F;
end;

type
  TClass = class
  private
    Field: TRec;
  public
    property Prop: String read Field.Func1;//E2562
  end;

begin
end.