fix corner case in sequences (#3704)

fixes #3703
This commit is contained in:
Alex Lam S.L
2020-02-04 04:57:32 +00:00
committed by GitHub
parent 36b2d35bf3
commit df506439b1
3 changed files with 73 additions and 39 deletions

View File

@@ -1093,3 +1093,22 @@ issue_3490_2: {
}
expect_stdout: "PASS 42"
}
issue_3703: {
options = {
evaluate: true,
sequences: true,
unsafe: true,
}
input: {
var a = "FAIL";
while ((a = "PASS", 0).foo = 0);
console.log(a);
}
expect: {
var a = "FAIL";
while (a = "PASS", (0).foo = 0);
console.log(a);
}
expect_stdout: "PASS"
}