fix corner case in collapse_vars (#5026)

fixes #5025
This commit is contained in:
Alex Lam S.L
2021-06-22 22:03:11 +01:00
committed by GitHub
parent 95090dbf24
commit 8b05677c15
4 changed files with 34 additions and 9 deletions

View File

@@ -4658,7 +4658,6 @@ replace_all_var_scope: {
rename = true
options = {
collapse_vars: true,
reduce_vars: true,
unused: true,
}
mangle = {}
@@ -4677,7 +4676,7 @@ replace_all_var_scope: {
(function(c, o) {
switch (~a) {
case (b += a):
case +o:
case o++:
}
})(--b, a);
console.log(a, b);