Michael Van Canneyt <mich...@freepascal.org> schrieb am Mi., 14. Aug. 2019, 18:24:
> Basically any operation that requires an address is not allowed. > That += is using an address is an implementation detail of the compiler. > Same as Inc() or In/Exclude(). I don't know the exact reason for this > limitation, > but it's bound to be a good one, otherwise it would have been lifted a > long time > ago... > The restriction regarding taking an address was only started to be enforced in 2.4.0 (see https://wiki.freepascal.org/User_Changes_2.4.0#Treating_direct-mapped_properties_as_regular_fields) and further extended to records in 2.6.0 (see https://wiki.freepascal.org/User_Changes_2.6.0#Taking_the_address_of_fields_of_record_properties ). The idea is to have properties backed by a field and backed by methods behave identically. Regards, Sven >
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal