Duplicate locals doesn't allow that local variables have same name as class members.
Original Reporter info from Mantis: zoran
-
Reporter name: Zoran Vučenović
Original Reporter info from Mantis: zoran
- Reporter name: Zoran Vučenović
Description:
1.
- In Delphi mode method parameters can have same name as class members.
- In ObjFpc mode method parameters cannot have same name as class members.
This can be changed by adding {$modeswitch duplicatelocals}...
However,
2.
- In Delphi mode local variables in methods can have same name as class members.
- In ObjFpc mode local variables in methods cannot have same name as class members.
Unlike (1), this cannot be changed with {$modeswitch duplicatelocals}!
Steps to reproduce:
Please see the example in forum: https://forum.lazarus.freepascal.org/index.php/topic,40220.0.html
Mantis conversion info:
- Mantis ID: 33221
- Build: 38304
- Version: 3.1.1
- Fixed in version: 3.3.1
- Fixed in revision: 44028 (#d87a5cc9)