From 94f3819dc6267f6e2efefdffc4b02e92a8e8a5d9 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sat, 26 Dec 2020 08:52:16 +0000 Subject: fix corner case in `reduce_vars` & `unused` (#4465) fixes #4464 --- test/reduce.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/reduce.js') diff --git a/test/reduce.js b/test/reduce.js index f6b54141..48030b0f 100644 --- a/test/reduce.js +++ b/test/reduce.js @@ -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 -- cgit v1.2.3