Skip to content

Conversation

@hishamhm
Copy link
Member

With this PR, Teal automatically injects local k = k in for-in loops where the control variable is modified, when --gen-target is set to 5.4, which is currently the correct option for Lua 5.4 and Lua 5.5.

Closes #1055. (See discussion in the PR.)

With this patch, Teal automatically injects `local k = k` in for-in
loops where the control variable is modified, when `--gen-target`
is set to 5.4, which is currently the correct option for Lua 5.4
and Lua 5.5.

Closes #1055.
@github-actions
Copy link

Teal Playground URL: https://1058--teal-playground-preview.netlify.app

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.

Lua 5.5 - for loop variables

2 participants