@@ -864,7 +864,11 @@ merge(Compressor.prototype, {
|
|||||||
push_ref(d, lhs);
|
push_ref(d, lhs);
|
||||||
if (d.fixed) {
|
if (d.fixed) {
|
||||||
lhs.fixed = d.fixed;
|
lhs.fixed = d.fixed;
|
||||||
lhs.fixed.assigns = [ node ];
|
if (lhs.fixed.assigns) {
|
||||||
|
lhs.fixed.assigns.push(node);
|
||||||
|
} else {
|
||||||
|
lhs.fixed.assigns = [ node ];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
lhs.walk(tw);
|
lhs.walk(tw);
|
||||||
|
|||||||
@@ -3251,3 +3251,26 @@ issue_4558_2: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "PASS"
|
expect_stdout: "PASS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_4662: {
|
||||||
|
options = {
|
||||||
|
evaluate: true,
|
||||||
|
reduce_vars: true,
|
||||||
|
toplevel: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
var a = 0;
|
||||||
|
function f(b, c) {
|
||||||
|
console.log(b, c);
|
||||||
|
}
|
||||||
|
f(++a, a = a, a);
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var a = 0;
|
||||||
|
(function(b, c) {
|
||||||
|
console.log(b, c);
|
||||||
|
})(++a, a = 1);
|
||||||
|
}
|
||||||
|
expect_stdout: "1 1"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user