[fpc-pascal] Parameterless constructors are not allowed in records or record/type helpers

Sven Barth pascaldragon at googlemail.com
Mon Feb 6 08:06:44 CET 2017


Am 06.02.2017 02:37 schrieb "Ryan Joseph" <ryan at thealchemistguild.com>:
>
> I tried class functions in records already but I got the error "Class
methods must be static in records”. Not sure what that means but I assumed
they don’t work either.

You need to add the "static" modifier to the method. Class functions in
records can't have a self parameter and the "static" disables that. That's
why.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170206/6050fcfb/attachment.html>


More information about the fpc-pascal mailing list