-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Milestone
Description
Describe the feature
function square(x) {
return x * x;
}
function cube(x) {
return square(x) * x;
}
console.log(cube(a));Produces:
var x, x1;
console.log((x1 = x = a) * x1 * x);x1 is unnecessary here.
Weirdly enough, when enabling mangling x1 gets renamed to x which looks funny:
var x, x;
console.log((x = x = a) * x * x);There may be some scoping issues with inlining which causes this (incorrect?) mangling behavior.
Babel plugin or link to the feature description
Additional context
No response