E2258 implements 節は class 型にしか許されていません (Delphi)

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

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

この例のインターフェース定義には implements 節が使用されているのでエラーとなる


program Produce;
type
  IMyInterface = interface
    function getter : IMyInterface;
    property MyInterface: IMyInterface read getter implements IMyInterface;
  end;
end.


この問題の唯一の解決策は implements 節を削除すること


program Solve;
type
  IMyInterface = interface
    function getter : IMyInterface;
    property MyInterface: IMyInterface read getter;
  end;
end.