Op Wed, 16 Jul 2008, schreef Daniël Mantione:
2.3 prevents you form taking the address of a property, because that way you can read/write its value directly, circumventing the getter/setter. So you cannot use the @ operator, but neither can you pass properties to var parameters. Include is an internal procedure that calls an rtl function that receives the set as a "var" parameter, preventing include to work.I think there can be two visions here: - Include is not a real procedure, so this internal implementation detail should be hidden and this can/should be allowed; the compiler internally should convert it into set:=set+[member]. - While include is not a real procedure, its set parameter is clearly defined as "var". Passing properties to var parameters is not allowed, so it should not be allowed for include either.
I forgot: The fact that 2.2 allows it does not mean 2.2 will generate correct code! Your getter/setter will be bypassed with 2.2 if you use include, that is why 2.3 prevents the generation of incorrect code.
Daniël
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel