fix corner case in evaluate (#4341)

fixes #4340
This commit is contained in:
Alex Lam S.L
2020-12-07 08:05:11 +00:00
committed by GitHub
parent 2f31f95095
commit fbecedf94c
4 changed files with 32 additions and 11 deletions

View File

@@ -287,3 +287,22 @@ issue_4337: {
expect_stdout: "PASS"
node_version: ">=8"
}
issue_4340: {
options = {
evaluate: true,
reduce_vars: true,
}
input: {
(async function a(a) {
console.log(a || "PASS");
})();
}
expect: {
(async function a(a) {
console.log(a || "PASS");
})();
}
expect_stdout: "PASS"
node_version: ">=8"
}