[fpc-devel] C style operator doesn't work with properties in 2.3.1
Jonas Maebe
jonas.maebe at elis.ugent.be
Wed Jul 16 17:37:59 CEST 2008
On 16 Jul 2008, at 16:23, Graeme Geldenhuys wrote:
> So it seems I can't use the += operator with properties either!! :-(
Indeed. I've checked the code and properties are explicitly not
allowed for the C-style operators. The reason is that the x+=y is
translated into "x:=x+y" at the parser level rather than at the
lexical level. This means that in case x is a property, at the point
that this transformation is performed the compiler already resolved it
into the setter property (so it can no longer access the getter).
Jonas
More information about the fpc-devel
mailing list