[fpc-devel] Question on interface inheritance...

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Feb 1 16:34:32 CET 2026



On 2/1/26 15:51, Martin Frb via fpc-devel wrote:
> On 01/02/2026 15:44, Mattias Gaertner via fpc-devel wrote:
>>
>>
>> On 2/1/26 15:29, Martin Frb via fpc-devel wrote:
>>> [...]
>>>    TIntfBarBase = interface
>>>      function GetFoo: TIntfFooBase;
>>>    end;
>>>    TIntfBar = interface(TIntfBarBase)
>>>      function GetFoo: TIntfFoo; reintroduce;
>>
>> reintroduce is not allowed in Delphi and should not in fpc neither.
> 
> It compiles without reintroduce too (just has a warning).
> 
> Or do you mean, the act of reintroduction, rather than the keyword?

I think the compiler should not allow reintroducing in interfaces.

In Delphi you get the same problem, stopping with

TIntfBarBase.GetFoo is not implemented


Mattias



More information about the fpc-devel mailing list