diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-26 08:52:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-26 16:52:16 +0800 |
commit | 94f3819dc6267f6e2efefdffc4b02e92a8e8a5d9 (patch) | |
tree | 578a45db1cbe311cc17db52c07eae185f65baa27 /test/reduce.js | |
parent | be1f5199f422080a42e962670758bd68f34b5bb6 (diff) | |
download | tracifyjs-94f3819dc6267f6e2efefdffc4b02e92a8e8a5d9.tar.gz tracifyjs-94f3819dc6267f6e2efefdffc4b02e92a8e8a5d9.zip |
fix corner case in `reduce_vars` & `unused` (#4465)
fixes #4464
Diffstat (limited to 'test/reduce.js')
-rw-r--r-- | test/reduce.js | 5 |
1 files changed, 5 insertions, 0 deletions
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 |