leledumbo schrieb:
I think a warning if the name inside of 'with' overrides a name from outer
scope would be an acceptable compromise.
I agree with this solution, it doesn't change the syntax, yet it gives
better chance to spot wrong scope of identifier which could happen during
porting or upgrade.

We have the same issue here as it exists for for-variables: If you forgot to declare your local for-variable it helps to get warned if the variable name exists as a global or parent function variable too. So a warning that a reference within a with statement resolves to a variable outside the with statement would help finding bugs.


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to