ICE when generic interfaces use forward class declaration

FPC 3.2.3 win64, Laz 2.2.0-66 Win64

Try to compile it - and you get an Internal Compiler Error on the interface's method declaration.

program Project1;

{$Mode Delphi} {$H+}

Type
  TImplClass<P> = class;

  iLinkingIntf<P> = interface
    procedure NestedCall(const DataFrom: TImplClass<P>);
  end;

(* Компиляция проекта, цель: Project1.exe: Код завершения 1, ошибок: 1
Project1.pas(9,55) Error: Internal error 2012101001
*)

  { TImplClass }

  TImplClass<P> = class( TInterfacedObject, iLinkingIntf<P> )
  protected
    procedure NestedCall(const DataFrom: TImplClass<P> );
  end;

{ TImplClass }

procedure TImplClass<P>.NestedCall(const DataFrom: TImplClass<P>);
begin

end;


begin
end.
Edited by Arioch The
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information