[fpc-pascal] Explicit Interface implementation and inheritance

Jean SUZINEAU jean.suzineau at wanadoo.fr
Sun Aug 15 07:53:27 CEST 2021

Le 15/08/2021 à 00:43, Dmitry Boyarintsev via fpc-pascal a écrit :
> Why is interface implementation not inherited, if explicit 
> implementation is used.

I guess this is because you can implement an interface through 
delegation too:


   IMyInterface = interface
     procedure P1;

   TMyClass = class(TInterfacedObject, IMyInterface)
     FMyInterface: IMyInterface; // interface type
     property MyInterface: IMyInterface
        read FMyInterface implements IMyInterface;

More information about the fpc-pascal mailing list