Skip to content

Fix captured let/const in 'for' condition or incrementer #47681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 1, 2022
Merged

Conversation

rbuckton
Copy link
Contributor

@rbuckton rbuckton commented Feb 1, 2022

This fixes a failure to propagate changes to a captured for variable declaration in a converted loop body when the declaration is captured in the condition or incrementer of the for statement.

Fixes #45598

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Feb 1, 2022
@andrewbranch
Copy link
Member

Don’t forget to close out #45675. Thanks @Reaphook for raising the issue and a good attempt at fixing it 👍

@rbuckton rbuckton merged commit 7183b14 into main Feb 1, 2022
@rbuckton rbuckton deleted the fix45598 branch February 1, 2022 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

for loop runs infinitely in es5 emit
3 participants