Automatic rename from variables in the IDE
- Lazarus/FPC Version: 2.2.0.2 (Copy from Menu -> Help -> About Lazarus -> Button "Copy version information to clipboard")
- Operating System: all
- CPU / Bitness: all (64 or 32 Bit?)
What happens
Lazarus rename local variables if a TMenuItes has the same name and the "Name" is renamed.
What did you expect
Do not rename the function local variables if the menu item is renamed
At second: FPC should not generate a error if a local variable has the same name as a TForm.Variable, only a warning.
Steps to reproduce
Start: Create a new project, add the event "FormCreate()", Add a local Valiable like "VAR n1: Integer;" Insert a TPopupMenu into the form, create a menu item "-" -> Compile: Error Rename the new menuitem to "mn_N1" -> all local valiables are renamed, too !! Compile after rename -> Error
Additional informatinos and a video how it works in the german lazarus forum: https://www.lazarusforum.de/viewtopic.php?p=124722&sid=6d07383eb5f7d7f2cc763a426ebf08d0#p124722