fix corner case in conditionals (#4624)

fixes #4623
This commit is contained in:
Alex Lam S.L
2021-02-08 10:31:08 +00:00
committed by GitHub
parent fd4caf7a9c
commit 357d861246
2 changed files with 34 additions and 28 deletions

View File

@@ -587,3 +587,18 @@ issue_4618: {
expect_stdout: "function"
node_version: ">=4"
}
issue_4623: {
options = {
conditionals: true,
}
input: {
if (console ? function*() {} : 0)
console.log("PASS");
}
expect: {
(console ? function*() {} : 0) && console.log("PASS");
}
expect_stdout: "PASS"
node_version: ">=4"
}