fix corner cases in properties (#5178)

fixes #5177
This commit is contained in:
Alex Lam S.L
2021-11-16 20:21:44 +00:00
committed by GitHub
parent 77f7ae5ba2
commit ae5c3ee8a1
6 changed files with 172 additions and 25 deletions

View File

@@ -453,7 +453,7 @@ object_function: {
}).f();
}
expect: {
(async function() {
(async () => {
console.log("PASS");
})();
}
@@ -2212,3 +2212,29 @@ issue_5159_2: {
]
node_version: ">=8"
}
issue_5177: {
options = {
properties: true,
}
input: {
(async function() {
return {
p(await) {},
}.p;
})().then(function(a) {
console.log(typeof a);
});
}
expect: {
(async function() {
return {
p(await) {},
}.p;
})().then(function(a) {
console.log(typeof a);
});
}
expect_stdout: "function"
node_version: ">=8"
}