public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
357d861
)
fix corner case in `--reduce-test` (#4625)
author
Alex Lam S.L
<alexlamsl@gmail.com>
Mon, 8 Feb 2021 11:16:21 +0000
(11:16 +0000)
committer
GitHub
<noreply@github.com>
Mon, 8 Feb 2021 11:16:21 +0000
(19:16 +0800)
test/reduce.js
patch
|
blob
|
history
diff --git
a/test/reduce.js
b/test/reduce.js
index
5f192ac
..
bfc0c17
100644
(file)
--- a/
test/reduce.js
+++ b/
test/reduce.js
@@
-131,6
+131,7
@@
module.exports = function reduce_test(testcase, minify_options, reduce_options)
case "delete":
return;
}
+ if (parent instanceof U.AST_VarDef && parent.name === node) return;
// preserve for (var xxx; ...)
if (parent instanceof U.AST_For && parent.init === node && node instanceof U.AST_Definitions) return node;
// preserve for (xxx in ...)