[fpc-pascal] Interface bug or some new feature
pascaldragon at googlemail.com
Sun Jan 6 13:57:15 CET 2019
Am 06.01.2019 um 13:30 schrieb denisgolovan:
> 06.01.2019, 15:00, "Sven Barth via fpc-pascal"
> <fpc-pascal at lists.freepascal.org>:
>> The default visibility for classes without $M+ is private. Thus
>> TClass1.P is private. An interface implementation does not have
>> access to private methods of a parent class. So you need to declare P
>> as protected for this to work.
>> Though to be fair in the specific example you gave I think that it
>> should work as both are within the same unit. We'll need to check
> Yes. That was another real issue in my project.
> However I managed to get it.
> Thanks for quick help.
Slight correction: the default visibility is Public, not Private, so
that shouldn't have been the problem with the specific example. :/
More information about the fpc-pascal