fix corner case in conditionals (#4599)

fixes #4598
This commit is contained in:
Alex Lam S.L
2021-01-30 08:54:29 +00:00
committed by GitHub
parent 35435d4bd3
commit 0cd4a199b0
2 changed files with 23 additions and 10 deletions

View File

@@ -1047,3 +1047,20 @@ issue_4595: {
expect_stdout: "0"
node_version: ">=8"
}
issue_4598: {
options = {
conditionals: true,
}
input: {
if (console.log("PASS")) {
async function f() {}
}
}
expect: {
async function f() {}
console.log("PASS");
}
expect_stdout: "PASS"
node_version: ">=8"
}