<div dir="ltr"><div>Hello,<br><br></div>Test env: debian jessie amd64 - fpc 3.0.2<br><div><br></div><div>It seems free pascal have a bug when handling interface inheritance using generics. <br><br>When i try to compile the unit bellow, i get this error: <br><br>"interface_bug.pas(41,44) Error: Incompatible types: got "TImplementor<System.LongInt>" expected "IParentInterface<System.LongInt>""<br><br><br></div><div>=== CODE ===<br><br><span style="font-family:monospace,monospace"><b>unit</b> interface_bug;<br><br>{$mode delphi}<br><br><b>interface</b><br><br><b>type</b><br><br>  IParentInterface<T> = <b>interface</b>            <br>    ['{0F78D56E-85A6-4024-98D7-720D7C7B9573}']<br>    <b>procedure</b> Foo; <br>  <b>end</b>;<br><br>  IChildInterface<T> = <b>interface</b>(IParentInterface<T>)<br>    ['{1AB2EB85-6843-462E-8CE4-32ECC065011E}'] <br>    <b>procedure</b> Bar;<br>  <b>end</b>;<br><br>  TImplementor<T> =  class(TInterfacedObject, IChildInterface<T>)<br>  <b>public</b><br>    <b>procedure</b> Foo;<br>    <b>procedure</b> Bar;<br>  <b>end</b>;<br>  <br><b>var</b><br>  ParentImplementorInstance: IParentInterface<Integer>;<br><br><b>implementation</b><br><br><b>procedure</b> TImplementor<T>.Foo;<br><b>begin</b><br><br><b>end</b>;<br><br><b>procedure</b> TImplementor<T>.Bar;<br><b>begin</b><br><br><b>end</b>;<br><br><b>initialization</b><br>  ParentImplementorInstance:=TImplementor<Integer>.Create;<br><br><b>end</b>.</span><br><br><br>===========<br></div><div><br></div><div><br></div></div>