RAD Studio (Common)
ContentsIndex
PreviousUpNext
E2259: Implements clause only allowed for properties of class or interface type (Delphi)

An attempt has been made to use the implements clause with an improper type. Only class or interface types may be used.

program Produce;
type
  TMyClass = class(TInterfacedObject)
    FInteger : Integer;
    property MyInterface: Integer read FInteger implements Integer;
  end;
end.

In this example the error is caused because an Integer type is used with an implements clause. 

The only solution for this error is to correct the implements clause so that it refers to a class or interface type, or to remove the offending clause altogether.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!