fix corner case in evaluate & unsafe (#5355)

fixes #5354
This commit is contained in:
Alex Lam S.L
2022-02-15 14:47:22 +08:00
committed by GitHub
parent 316245ee12
commit 0b50880b4f
3 changed files with 58 additions and 29 deletions

View File

@@ -842,9 +842,9 @@ unary_binary_parentheses: {
v.forEach(function(x) {
v.forEach(function(y) {
console.log(
+x*y,
+x/y,
+x%y,
x*y,
x/y,
x%y,
-x*y,
-x/y,
-x%y
@@ -1397,7 +1397,7 @@ issue_3695: {
}
expect: {
var a = [];
console.log(+(a * (a[0] = false)));
console.log(a * (a[0] = false));
}
expect_stdout: "NaN"
}