Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,094
    • Issues 2,094
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 7
    • Merge requests 7
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

We will soon be undergoing scheduled maintenance to our database layer. We expect GitLab.com to be unavailable for up to 2 hours starting from 2022-07-02 06:00 UTC. Please note that any CI jobs that start before the maintenance window but complete during the window period will fail and may need to be started again.

  • FPC
  • Lazarus
  • LazarusLazarus
  • Issues
  • #39471
Closed (duplicated) (duplicated)
Open
Created Nov 17, 2021 by M. M.@MmVisual

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

Assignee
Assign to
Time tracking