fix corner cases in collapse_vars (#4978)

fixes #4977
This commit is contained in:
Alex Lam S.L
2021-05-29 01:57:24 +01:00
committed by GitHub
parent d40631fd44
commit 7fa1dea9d0
7 changed files with 179 additions and 18 deletions

View File

@@ -727,7 +727,8 @@ side_effects_cascade_1: {
}
expect: {
function f(a, b) {
b.a = a = (a -= 42) < 0 ? 0 : a;
(a -= 42) < 0 && (a = 0),
b.a = a;
}
var m = {}, n = {};
f(13, m),