fix corner case in inline (#5343)

fixes #5342
This commit is contained in:
Alex Lam S.L
2022-02-05 05:19:42 +00:00
committed by GitHub
parent d338e45033
commit 6fb7de7787
3 changed files with 84 additions and 20 deletions

View File

@@ -1713,16 +1713,14 @@ issue_2620_5: {
}
expect: {
var c = "FAIL";
(function() {
var a = 0/0;
var NaN = void 0;
!function(a, NaN) {
switch (a) {
case a:
break;
case c = "PASS", NaN:
break;
}
})();
}(NaN);
console.log(c);
}
expect_stdout: "PASS"
@@ -7635,9 +7633,10 @@ issue_5237: {
}
expect: {
function f() {
while (console.log(0/0));
var NaN = console && console.log(NaN);
return;
while (console.log(NaN));
(function() {
var NaN = console && console.log(NaN);
})();
}
f();
}