Browse Source

+ support for generic forward declarations fixes #39581, so add a test for it

Sven/Sarah Barth 3 years ago
parent
commit
c14c3ec98f
1 changed files with 35 additions and 0 deletions
  1. 35 0
      tests/webtbs/tw39581.pp

+ 35 - 0
tests/webtbs/tw39581.pp

@@ -0,0 +1,35 @@
+{ %NORUN }
+
+program tw39581;
+
+{$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.
+