fix corner case with parentheses around await (#4344)

This commit is contained in:
Alex Lam S.L
2020-12-07 20:29:54 +00:00
committed by GitHub
parent 4bde50ce85
commit 336336f53f
2 changed files with 32 additions and 0 deletions

View File

@@ -306,3 +306,25 @@ issue_4340: {
expect_stdout: "PASS"
node_version: ">=8"
}
call_expression: {
input: {
console.log(typeof async function(log) {
(await log)("FAIL");
}(console.log).then);
}
expect_exact: 'console.log(typeof async function(log){(await log)("FAIL")}(console.log).then);'
expect_stdout: "function"
node_version: ">=8"
}
property_access_expression: {
input: {
console.log(typeof async function(con) {
(await con).log("FAIL");
}(console).then);
}
expect_exact: 'console.log(typeof async function(con){(await con).log("FAIL")}(console).then);'
expect_stdout: "function"
node_version: ">=8"
}