Delphi Error – E2535 Interface methods must not have parameterized methods

Delphi Compiler Error

E2535 Interface methods must not have parameterized methods

Reason for the Error & Solution

This occurs when trying to declare a parametrized method as part of an interface.

program E2535;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
IMyInterface = interface
  procedure Receive<T>(Event: T);
end;

begin
  Writeln('E2535 Interface methods must not have parameterized methods');
end.

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...