fix corner case in side_effects (#4752)

fixes #4751
This commit is contained in:
Alex Lam S.L
2021-03-07 20:19:51 +00:00
committed by GitHub
parent 31e7d25cad
commit f52b0e7c31
9 changed files with 277 additions and 45 deletions

View File

@@ -2862,7 +2862,7 @@ lvalues_def: {
expect: {
var a = 0, b = 1;
a = b++, b = +void 0;
a && a++;
a && a[a++];
console.log(a, b);
}
expect_stdout: true
@@ -5096,7 +5096,7 @@ issue_2878: {
}
b = f2();
a = 1;
b && b[console];
b && b.b;
f2();
})();
console.log(c);
@@ -5109,7 +5109,7 @@ issue_2878: {
}
b = f2(),
a = 1,
b && console,
b && b.b,
f2();
})(),
console.log(c);
@@ -6544,7 +6544,7 @@ issue_3520: {
(function f() {
c = 0;
var i = void 0;
var f = f && f[console && i];
var f = f && f[i];
})();
a += b;
c && b++;
@@ -6558,7 +6558,7 @@ issue_3520: {
for (var i = 2; --i >= 0;) {
(function() {
c = 0;
var f = f && f[console && void 0];
var f = f && f[void 0];
})();
a += b;
c && b++;