RAD Studio (Common)
ContentsIndex
PreviousUpNext
E2420: Interface '%s' used in '%s' is not yet completely defined (Delphi)

Interface used in is not yet completely defined. Forward declared interfaces must be declared in the same type section that they are used in. As an example the following code will not compile because of the above error message:

program Project3;

{$APPTYPE CONSOLE}

type
  TInterface = interface;

  TFoo = class
    type
      TBar = class(TObject, TInterface)
        procedure Bar;
      end;
  end;

  TInterface = interface
    procedure Intf;
  end;

procedure TFoo.TBar.Bar;
begin

end;

begin
end.

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