On 17 Jul 2008, at 08:48, Graeme Geldenhuys wrote:

On Wed, Jul 16, 2008 at 5:37 PM, Jonas Maebe <[EMAIL PROTECTED] > wrote:
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).

Sorry if the following sounds stupid, but I'm a applications
developer, not a compiler developer. I do not know or understand the
internals of a compiler.

So is what you mentioned above by design, or an oversight?

I'm fairly certain that the C-style operators were implemented long before most, if any, Delphi feature had been implemented (possibly even before Delphi had properties).

We spoke earlier in another thread about hidden exceptions (rules)
which will just complicate things in the long run. Well to me, this
looks like one of those exceptions which the FPC core would like to
prevent.

Feel free to file a bug report.


Jonas
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to