Skip to content

Conversation

@XmiliaH
Copy link
Contributor

@XmiliaH XmiliaH commented Nov 23, 2025

In case the iteration variable of a loop shadows a variable in the outer scope it will be removed due to the use of undeclareVariable as seen in

local i=3
for i=1,1 do
end
print(i)

Instead add a new scope for the iteration variables preventing shadowed variables from being removed.

The undeclareVariable and undeclareVariables methods are now unused and could be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant