I was working on a very long case statement renaming screen labels. That's when it happened.
the Case Statement had over 50 items. The idea being I could call the procedure with a single Integer and turn a label visible or dark. Or a range of numbers with a start to fini and clear or populate a screen.
That's VERY important information you left out earlier.
I can imagine that somehow the refactoring mechanism of Lazarus IDE screwed up.
But it could also be that you yourself screwed up somehow with the renaming.
How did you go about the process of renaming those screen labels ??
Did you use search&replace?
Note that if you use search and replace and you have the "Regular expression" box checked, strange things can happen if you're not familiar with regular expressions.
Also, it could still be that renaming a variable with incorrect code afterwards, the refactoring of the code if done incorrectly.
Do you still have the code before changing it? Can you reproduce the steps of changing the large case statement?