-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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): Add missing visit children for destructuring
#9658
fix(es/compat): Add missing visit children for destructuring
#9658
Conversation
🦋 Changeset detectedLatest commit: ebab9b3 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
CodSpeed Performance ReportMerging #9658 will not alter performanceComparing Summary
|
…m:stormslowly/swc into fix/deconstructing_skip_visiting_children
I believe the fix is correct, but I can't reproduce the issue in the swc playground. I suspect our transformer has redundant elsewhere. |
in my opinion, in swc playground run the @magic-akari you can try comment out the visit children call, then run the new added case, panic will appear |
If so, the order of transform is wrong. The compatibility transforms are expected to run in the correct order, and the correct order is.. well it's not documented but |
swc/crates/swc_ecma_compat_es2015/src/for_of.rs Lines 274 to 283 in 9c35520
In the Ideally, these two transformations should be independent, allowing us to retain destructuring (the I have not yet confirmed whether the current situation matches the description above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this fix is in the right direction, let's merge this fix first.
destructuring
Description:
add missing
visit_mut_children_with
in deconstructing transformBREAKING CHANGE:
NO
Related issue (if exists):
ref: #9647