fix corner cases in inline & unused (#4509)

fixes #4508
This commit is contained in:
Alex Lam S.L
2021-01-05 16:15:12 +00:00
committed by GitHub
parent 6eceac0966
commit 7ebfb22d16
3 changed files with 46 additions and 20 deletions

View File

@@ -2669,8 +2669,7 @@ issue_3956: {
})();
}
expect: {
var c, d;
c += 0,
var d;
console.log(NaN),
d = 1 ^ console.log(1),
console.log(d);
@@ -2703,13 +2702,13 @@ issue_3962_1: {
}
expect: {
var a = 0;
a = (function(c) {
(function(c) {
do {
console;
0..toString();
} while (0);
if (c) console.log("PASS");
}(1), 0);
})(1);
void 0;
}
expect_stdout: "PASS"
@@ -2736,13 +2735,13 @@ issue_3962_2: {
}
expect: {
var a = 0;
a = (function(c) {
(function(c) {
do {
console;
0..toString();
} while (0);
if (c) console.log("PASS");
}(1), 0);
})(1);
}
expect_stdout: "PASS"
}
@@ -2799,7 +2798,9 @@ issue_4017: {
var a = 0;
console.log(function() {
c &= 0;
var c = (a++, A = a, 0);
var c;
a++,
A = a;
}());
}
expect_stdout: "undefined"