Skip to content

Fix captured const in downlevel for-await #47680

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

Fix captured const in downlevel for-await #47680

merged 1 commit into from
Feb 1, 2022

Conversation

rbuckton
Copy link
Contributor

@rbuckton rbuckton commented Feb 1, 2022

This adds a missing original pointer to the for loop created when emitting for await downlevel to ES5, which was preventing proper capture of per-iteration bindings.

Fixes #42001

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Feb 1, 2022
@rbuckton rbuckton merged commit 21bbb57 into main Feb 1, 2022
@rbuckton rbuckton deleted the fix42001 branch February 1, 2022 19:47
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.

Per-iteration scoped variables not emitted per-iteration when using for..await
3 participants