fix corner case in reduce_vars & unused (#4465)

fixes #4464
This commit is contained in:
Alex Lam S.L
2020-12-26 08:52:16 +00:00
committed by GitHub
parent be1f5199f4
commit 94f3819dc6
3 changed files with 87 additions and 6 deletions

View File

@@ -352,6 +352,11 @@ module.exports = function reduce_test(testcase, minify_options, reduce_options)
}
}
}
else if (node instanceof U.AST_Spread) {
node.start._permute++;
CHANGED = true;
return node.expression;
}
else if (node instanceof U.AST_Switch) {
var expr = [
node.expression, // switch expression