On Tue, Jul 9, 2019 at 9:39 AM Ryan Joseph <[email protected]> wrote:
> Another thing regarding array properties. If I use constref on the setter
> I get an error "Illegal symbol for property access”. Is there any reason
> why the setter can’t be constref?
>
It works for constref if you use {$VARPROPSETTER ON}.
The docs for that directive are slightly incorrect, I just noticed, also:
https://www.freepascal.org/docs-html/current/prog/progsu121.html
Where it says "Enable use of var/out/const parameters for property
setters", it should say "Enable use of var/out/constref parameters for
property setters", because "const" is always allowed, and does not
*guarantee* by-reference passing the way "constref" does.
_______________________________________________
fpc-devel maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel