@@ -8073,15 +8073,7 @@ merge(Compressor.prototype, {
|
||||
}
|
||||
if (argname instanceof AST_Destructured) {
|
||||
has_destructured = true;
|
||||
var abort = false;
|
||||
argname.walk(new TreeWalker(function(node) {
|
||||
if (abort) return true;
|
||||
if (node instanceof AST_DestructuredKeyVal) {
|
||||
var key = node.key;
|
||||
if (key instanceof AST_Node && has_arg_refs(key)) return abort = true;
|
||||
}
|
||||
}));
|
||||
if (abort) return false;
|
||||
if (has_arg_refs(argname)) return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
@@ -2384,3 +2384,17 @@ issue_4508: {
|
||||
]
|
||||
node_version: ">=6"
|
||||
}
|
||||
|
||||
issue_4512: {
|
||||
options = {
|
||||
side_effects: true,
|
||||
}
|
||||
input: {
|
||||
console.log(function([ a, b = a ]) {}([]));
|
||||
}
|
||||
expect: {
|
||||
console.log(function([ a, b = a ]) {}([]));
|
||||
}
|
||||
expect_stdout: "undefined"
|
||||
node_version: ">=6"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user