[fpc-pascal] Interface Inheritance Bug

African Wild Dog paintedlycaon at gmail.com
Sun Mar 19 05:06:50 CET 2017


Test env: debian jessie amd64 - fpc 3.0.2

It seems free pascal have a bug when handling interface inheritance using

When i try to compile the unit bellow, i get this error:

"interface_bug.pas(41,44) Error: Incompatible types: got
"TImplementor<System.LongInt>" expected "IParentInterface<System.LongInt>""

=== CODE ===

*unit* interface_bug;

{$mode delphi}



  IParentInterface<T> = *interface*
    *procedure* Foo;

  IChildInterface<T> = *interface*(IParentInterface<T>)
    *procedure* Bar;

  TImplementor<T> =  class(TInterfacedObject, IChildInterface<T>)
    *procedure* Foo;
    *procedure* Bar;

  ParentImplementorInstance: IParentInterface<Integer>;


*procedure* TImplementor<T>.Foo;


*procedure* TImplementor<T>.Bar;




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170319/e51366d8/attachment.html>

More information about the fpc-pascal mailing list