@@ -1792,7 +1792,12 @@ merge(Compressor.prototype, {
|
|||||||
right: candidate.value
|
right: candidate.value
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
candidate.write_only = false;
|
var assign = candidate;
|
||||||
|
while (assign.write_only) {
|
||||||
|
assign.write_only = false;
|
||||||
|
if (!(assign instanceof AST_Assign)) break;
|
||||||
|
assign = assign.right;
|
||||||
|
}
|
||||||
return candidate;
|
return candidate;
|
||||||
}
|
}
|
||||||
// These node types have child nodes that execute sequentially,
|
// These node types have child nodes that execute sequentially,
|
||||||
|
|||||||
@@ -1681,3 +1681,25 @@ issue_4817: {
|
|||||||
expect_stdout: "function"
|
expect_stdout: "function"
|
||||||
node_version: ">=6"
|
node_version: ">=6"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_4854: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
inline: true,
|
||||||
|
side_effects: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
console.log(function(a) {
|
||||||
|
(function(b = a = "foo") {
|
||||||
|
[] = "foo";
|
||||||
|
})();
|
||||||
|
a;
|
||||||
|
}());
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
console.log(void ([] = "foo"));
|
||||||
|
}
|
||||||
|
expect_stdout: "undefined"
|
||||||
|
node_version: ">=6"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user