@@ -2593,7 +2593,8 @@ Compressor.prototype.compress = function(node) {
|
|||||||
if (value instanceof AST_Array) return !all(node.elements, function(element, index) {
|
if (value instanceof AST_Array) return !all(node.elements, function(element, index) {
|
||||||
return !arg_may_throw(reject, element, value[index]);
|
return !arg_may_throw(reject, element, value[index]);
|
||||||
});
|
});
|
||||||
return value.is_string(compressor) && !all(node.elements, function(element) {
|
if (!value.is_string(compressor)) return true;
|
||||||
|
return !all(node.elements, function(element) {
|
||||||
return !arg_may_throw(reject, element);
|
return !arg_may_throw(reject, element);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3817,3 +3817,30 @@ issue_5533_drop_fargs: {
|
|||||||
expect_stdout: "PASS"
|
expect_stdout: "PASS"
|
||||||
node_version: ">=6"
|
node_version: ">=6"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_5573: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
var log = console.log;
|
||||||
|
var a = "FAIL";
|
||||||
|
(function([ { [log(a)]: b } ]) {
|
||||||
|
A = 42;
|
||||||
|
})((a = "PASS", [ {} ]));
|
||||||
|
log(a, A);
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var log = console.log;
|
||||||
|
var a = "FAIL";
|
||||||
|
(function([ { [log(a)]: b } ]) {
|
||||||
|
A = 42;
|
||||||
|
})((a = "PASS", [ {} ]));
|
||||||
|
log(a, A);
|
||||||
|
}
|
||||||
|
expect_stdout: [
|
||||||
|
"PASS",
|
||||||
|
"PASS 42",
|
||||||
|
]
|
||||||
|
node_version: ">=6"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user