[fpc-pascal] WHY compiler should be public?
Sven Barth
pascaldragon at googlemail.com
Sun Oct 27 13:29:16 CET 2013
Am 27.10.2013 02:12 schrieb "Xiangrong Fang" <xrfang at gmail.com>:
> Also,
>
> I don't understand why this does not work:
>
> f := TFileStream.Create;
>
> I know that TFileStream's Create require a file name parameter, but as
TFileStream is inherited from TObject, which has a Create without
parameter. This is why I feel that it is possible to HIDE a public
constructor from ancestor.
Yes, it's possible to hide a public constructor (or any method for that
matter), but it's not possible to decrease the visibility of a constructor
(or any method for that.matter).
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20131027/cd310e89/attachment.html>
More information about the fpc-pascal
mailing list