Delphi Error – E2208 Interface ‘%s’ already implemented by ‘%s’

Delphi Compiler Error

E2208 Interface ‘%s’ already implemented by ‘%s’

Reason for the Error & Solution

The class specified by name2 has specified the interface name1 more than once in the inheritance section of the class definition.

program Produce;
  type
    IBaseIntf = interface
    end;

    TBaseClass = class (TInterfacedObject, IBaseIntf, IBaseIntf)
    end;

begin
end.

In this example, the IBaseIntf interface is specified multiple times in the inheritance section of the definition of TBaseClass. As a class can not implement the same interface more than once, this cause the compiler to emit the error message.

program Solve;

  type
    IBaseIntf = interface
    end;

    TBaseClass = class (TInterfacedObject, IBaseIntf)
    end;

begin
end.

The only solution to this error message is to ensure that a particular interface appears no more than once in the inheritance section of a class definition.