HomeDelphiDelphi Error – E2263 Implements getter cannot be dynamic or message method

Delphi Error – E2263 Implements getter cannot be dynamic or message method

Delphi Compiler Error

E2263 Implements getter cannot be dynamic or message method

Reason for the Error & Solution

An attempt has been made to use a dynamic or message method as a property accessor of a property which has an implements clause.

program Produce;
type
  I0 = interface
  end;

  T0 = class(TInterfacedObject, I0)
    function getter : I0; dynamic;
    property p0 : I0 read getter implements I0;
  end;

function T0.getter : I0;
begin
end;

end.


As shown in the example here, it is an error to use the dynamic modifier on a getter for a property which has an implements clause.

program Produce;
type
  I0 = interface
  end;

  T0 = class(TInterfacedObject, I0)
    function getter : I0;
    property p0 : I0 read getter implements I0;
  end;

function T0.getter : I0;
begin
end;

end.


To remove this error from your programs, remove the offending dynamic or method declaration.

Share:

Leave A Reply

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

You May Also Like

Delphi Compiler Error X2421 Imported identifier ‘%s’ conflicts with ‘%s’ in ‘%s’ Reason for the Error & Solution This occurs...
Delphi Compiler Error X2367 Case of property accessor method %s.%s should be %s.%s Reason for the Error & Solution No...
Delphi Compiler Error X2269 Overriding virtual method ‘%s.%s’ has lower visibility (%s) than base class ‘%s’ (%s) Reason for the...