-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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/minifier): Don't drop inlined parameter as duplicate #6293
Conversation
if let Some(usage) = self.data.vars.get_mut(&name.to_id()) { | ||
if usage.is_fn_local | ||
&& usage.declared_as_fn_param | ||
&& usage.declared_count >= 2 |
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.
This is the fix
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.
swc-bump:
- swc_ecma_minifier
state: d | ||
}); | ||
} | ||
}); |
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.
Previous output:
"use strict";
Yp.revoke, (o)=>Yp.config({
aria: {
mode: "checked"
},
...ge(o, (o, g)=>"exclusive" !== g),
onToggled (g, t) {
p(o.onToggled) && o.onToggled(g, t), e = g, f = t, Or(e, th, {
item: e,
state: f
});
}
});
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.
Automated review comment generated by auto-rebase script
This PR updates swc crates to swc-project/swc@5784ae2 Applies - swc-project/swc#6300 Closes #42171. - swc-project/swc#6293 - swc-project/swc#6272 Closes #41992.
Description:
Previously, we prepend a variable declaration using IIFE invoker, and dropped it as a duplicate because it's declared as a function parameter.
Related issue:
Investigation