fix corner case in evaluate & unsafe_math (#3756)

fixes #3755
This commit is contained in:
Alex Lam S.L
2020-03-30 12:13:14 +01:00
committed by GitHub
parent c69c026728
commit dc0cd088cf
2 changed files with 17 additions and 0 deletions

View File

@@ -2174,3 +2174,19 @@ issue_3738: {
}
expect_stdout: "Infinity"
}
issue_3755: {
options = {
booleans: true,
evaluate: true,
unsafe: true,
unsafe_math: true,
}
input: {
console.log((/4/.exec(1 + (!0 - 5 / "23")) || 0).p);
}
expect: {
console.log((/4/.exec(!0 - 5 / "23" + 1), 0).p);
}
expect_stdout: "undefined"
}