[fpc-devel] Correct syntax for default param?
Martin Frb
lazarus at mfriebe.de
Sat Mar 7 08:11:00 CET 2026
https://gitlab.com/freepascal.org/fpc/source/-/work_items/41642#note_3135425124
> That's actually a FPC compiler bug:
> procedure WriteProperty(Path: String; Instance: TObject;
> PropInfo: Pointer; DefInstance: TObject = nil;
> const OnlyProperty: array of String);
then what is the correct syntax?
The link suggests there needs to be a default value for OnlyProperty
(and I would have expected that too).
But FPC does reject *any* default. It reject the = sign itself, if any
is added.
So what is the correct syntax?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20260307/285ba030/attachment.htm>
More information about the fpc-devel
mailing list