@@ -681,6 +681,7 @@ merge(Compressor.prototype, {
|
|||||||
&& can_drop_symbol(sym) && safe_to_assign(tw, d)) {
|
&& can_drop_symbol(sym) && safe_to_assign(tw, d)) {
|
||||||
push_ref(d, sym);
|
push_ref(d, sym);
|
||||||
mark(tw, d);
|
mark(tw, d);
|
||||||
|
if (d.single_use && left instanceof AST_Destructured) d.single_use = false;
|
||||||
tw.loop_ids[d.id] = tw.in_loop;
|
tw.loop_ids[d.id] = tw.in_loop;
|
||||||
mark_escaped(tw, d, sym.scope, node, node.right, 0, 1);
|
mark_escaped(tw, d, sym.scope, node, node.right, 0, 1);
|
||||||
sym.fixed = d.fixed = fixed;
|
sym.fixed = d.fixed = fixed;
|
||||||
|
|||||||
@@ -1503,6 +1503,25 @@ issue_4294: {
|
|||||||
node_version: ">=6"
|
node_version: ">=6"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_4297: {
|
||||||
|
options = {
|
||||||
|
reduce_vars: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
console.log(typeof function(a) {
|
||||||
|
return { a } = a;
|
||||||
|
}(function() {}));
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
console.log(typeof function(a) {
|
||||||
|
return { a } = a;
|
||||||
|
}(function() {}));
|
||||||
|
}
|
||||||
|
expect_stdout: "function"
|
||||||
|
node_version: ">=6"
|
||||||
|
}
|
||||||
|
|
||||||
issue_4298: {
|
issue_4298: {
|
||||||
options = {
|
options = {
|
||||||
merge_vars: true,
|
merge_vars: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user