[fpc-pascal] += property bug?
    Jonas Maebe 
    jonas at freepascal.org
       
    Tue Aug 13 19:14:44 CEST 2019
    
    
  
On 13/08/2019 14:44, Martok wrote:
> Am 12.08.2019 um 11:31 schrieb Sven Barth via fpc-pascal:
>> The code you linked converts "a += b" to "tmp := @a; tmp^ := tmp^ + b", so
>> except for using a temp to avoid duplicate calculation of "a" in how far is this
>> not the long form? 
> 
> No, I meant it doesn't re-parse as its long form, which is why it has some
> limitations. In this case for example handle_propertysym does not know it is
> actually seeing an assignment.
If the compiler would do that, the behaviour could change from what you
would expect from glancing over the code, because the left-hand side
would be evaluated twice instead of once.
Jonas
    
    
More information about the fpc-pascal
mailing list