Delphi Error – E2259 Implements clause only allowed for properties of class or interface type

Delphi Compiler Error

E2259 Implements clause only allowed for properties of class or interface type

Reason for the Error & Solution

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.

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

Delphi Compiler Error E2313 Attribute – Known attribute cannot specify properties Reason for the Error & Solution No further information...
Delphi Compiler Error E2379 Virtual methods not allowed in record types Reason for the Error & Solution No further information...
Rodrigo , one of the long time Delphi Developer has been working on one of his personal project “Delphi IDE...