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

@@ -1151,7 +1151,6 @@ replace_all_var_scope: {
options = {
collapse_vars: true,
keep_fargs: false,
reduce_vars: true,
unused: true,
}
mangle = {}
@@ -1170,7 +1169,7 @@ replace_all_var_scope: {
(function(c) {
switch (~a) {
case (b += a):
case +c:
case c++:
}
})((--b, a));
console.log(a, b);