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
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to