Skip to content
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

fix(es/compat): Consider only the variables used in the closure #9151

Merged
merged 5 commits into from
Jul 8, 2024

Conversation

CPunisher
Copy link
Member

@CPunisher CPunisher commented Jul 5, 2024

Description:

The original code separately records the usage of variables and checks if there is a closure. Changed to only record variables used in a closure.

I run UPDATE=1 cargo test -p swc -p swc_ecma_transforms_compat --features concurrent. I'm not sure if that's enough.

Related issue:

@CPunisher CPunisher requested a review from a team as a code owner July 5, 2024 12:17
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

swc-bump:

  • swc_core
  • swc_ecma_compat_es2015

@kdy1 kdy1 added this to the Planned milestone Jul 8, 2024
@kdy1 kdy1 enabled auto-merge (squash) July 8, 2024 13:00
@kdy1 kdy1 changed the title fix(es/compat): Consider only the variables used in the closure in mark_as_used fix(es/compat): Consider only the variables used in the closure Jul 8, 2024
@kdy1 kdy1 disabled auto-merge July 8, 2024 13:01
@kdy1 kdy1 merged commit 1357531 into swc-project:main Jul 8, 2024
149 checks passed
@kdy1 kdy1 modified the milestones: Planned, v1.7.0 Jul 17, 2024
@swc-project swc-project locked as resolved and limited conversation to collaborators Aug 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

for-of loop variable scoping is invalid for nested loops
2 participants