[fpc-pascal] private type and type compatibility

Xiangrong Fang xrfang at gmail.com
Wed Oct 30 10:56:19 CET 2013


2013/10/30 Sven Barth <pascaldragon at googlemail.com>

> I think it is an error. You declare something as private, and then you use
>> it in a public function ? If that is not a visibility clash, I don't know
>> what is :)
>>
> I agree, but the question is should we declare this as a bug in the
> language and thus fix it which might lead to adjustments of legacy (2.6.x)
> code or use a warning. I personally would do the former (and better sooner
> than later). We need to keep the current behavior in mode Delphi however...
> (Note: Delphi additionally allows to access protected types from external
> units; could be related to the point that helper types allow access to
> protected types and fields as well...)
>

​I also agree that it is a bug. That's why I am confused.​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20131030/9e978bc3/attachment.html>


More information about the fpc-pascal mailing list