fix corner case in evaluate (#4078)

fixes #4077
This commit is contained in:
Alex Lam S.L
2020-08-26 12:45:38 +01:00
committed by GitHub
parent 93d084a1d1
commit 3aa765e429
2 changed files with 16 additions and 1 deletions

View File

@@ -2894,3 +2894,17 @@ issue_4067: {
}
expect_stdout: "NaN"
}
issue_4077: {
options = {
evaluate: true,
unsafe: true,
}
input: {
console.log((a = []) - (a[0]++, 1) || "PASS");
}
expect: {
console.log((a = []) - (a[0]++, 1) || "PASS");
}
expect_stdout: "PASS"
}