@@ -4801,7 +4801,7 @@ merge(Compressor.prototype, {
|
|||||||
if (node instanceof AST_Call) {
|
if (node instanceof AST_Call) {
|
||||||
var exp = node.expression;
|
var exp = node.expression;
|
||||||
var tail = exp.tail_node();
|
var tail = exp.tail_node();
|
||||||
if (!(tail instanceof AST_Function)) return;
|
if (!is_function(tail)) return;
|
||||||
if (exp !== tail) exp.expressions.slice(0, -1).forEach(function(node) {
|
if (exp !== tail) exp.expressions.slice(0, -1).forEach(function(node) {
|
||||||
node.walk(tw);
|
node.walk(tw);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -567,3 +567,33 @@ issue_4377: {
|
|||||||
expect_stdout: "function"
|
expect_stdout: "function"
|
||||||
node_version: ">=8"
|
node_version: ">=8"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_4406: {
|
||||||
|
options = {
|
||||||
|
merge_vars: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
A = "PASS";
|
||||||
|
B = "FAIL";
|
||||||
|
(function() {
|
||||||
|
var a, b;
|
||||||
|
a = A;
|
||||||
|
(async function({
|
||||||
|
[console.log(a)]: {},
|
||||||
|
}) {})((b = B) && { undefined: b });
|
||||||
|
})();
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
A = "PASS";
|
||||||
|
B = "FAIL";
|
||||||
|
(function() {
|
||||||
|
var a, b;
|
||||||
|
a = A;
|
||||||
|
(async function({
|
||||||
|
[console.log(a)]: {},
|
||||||
|
}) {})((b = B) && { undefined: b });
|
||||||
|
})();
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
node_version: ">=8"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user