[fpc-pascal] Constants in generics tests

Sven Barth pascaldragon at googlemail.com
Fri Feb 15 21:50:28 CET 2019


Am Fr., 15. Feb. 2019, 20:58 hat Ryan Joseph <ryan at thealchemistguild.com>
geschrieben:

>
>
> > On Feb 15, 2019, at 2:11 PM, Ryan Joseph <ryan at thealchemistguild.com>
> wrote:
> >
> > Also I just noticed that I’m getting warnings from the “U” constant
> which is declared in the “strict private” section (Private const
> "TTest$1.U" never used). That needs to be fixed also. Sven or some other
> compiler guy, do you know how to silence that warning?
>
> Upon further testing this warning is in all generics. Was this warning
> intentional? Should it stand for constants also?
>

Yes and yes :)
The type parameters must not be visible in subclasses except the generic
deems it so by using a type (or now constant) alias. This is Delphi
compatible.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190215/6034016c/attachment.html>


More information about the fpc-pascal mailing list