openroberta-lab
openroberta-lab copied to clipboard
loop-variables aren't automatically deleted when removing the forLoop-block
Describe the bug
2 problems:
- using a loop-variable out of scope and then removing the initial forLoop-block does not remove the loop-variable
- declaring at least two variables so that you can switch between them in the variableSet/Get-block, then removing the forLoop-block, you are still able to switch between the variable name from the removed variable back and forth as long as at least one variable is still named after the removed one
To Reproduce
Concentrating on the second problem because that includes the first one too:
-
Create two forLoop-blocks ( or one forLoop-block and a global variable, that doesnt matter)
-
Create two or more variable-blocks, select the variable name of the forLoop-block and use it out of scope (e.g below the forLoop-block)
-
Remove the forLoop-block
-
See error (you can even open the code-view and its generates the code even though it shouldn't)
Expected behavior
- The loop-variable should get deleted automatically when removing the forLoop-block, like it happens when removing the declaration of a global-variable
Example Program
Ok, same happens when declaring a variable in a function-block, using a variables_set/get block out of scope and deleting the function-block
before deletion
after deletion
Bug is still present
Issue still exists on test server.
Solved