Skip to content

Variables are considered undefined during some for loop interactions #571

Closed
@vicchig

Description

  1. Create a variable x = 123
  2. Create a for loop for x in [1,2,3]
  3. Insert print(x + 5) inside the body of the loop.
  4. Remove the identifier x in the for loop.
  5. Navigate off the loop statement and observe that the reference to x inside the print is marked with a warning even though it should not be because x is still declared outside of the loop in its parent scope.
  6. Navigate to the declaration of x outside of the for loop (above).
  7. Navigate off of it and observe that the warning is removed and so is the variable button for x even though it is still defined.

Related: #565, #570

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions