support async function within object literal (#4424)

This commit is contained in:
Alex Lam S.L
2020-12-20 00:19:04 +00:00
committed by GitHub
parent 8ce3c7d70f
commit b7c49b72b3
4 changed files with 85 additions and 19 deletions

View File

@@ -257,6 +257,29 @@ keep_computed_key: {
node_version: ">=4"
}
shorthand_keywords: {
options = {
evaluate: true,
reduce_vars: true,
toplevel: true,
unsafe: true,
unused: true,
}
input: {
var async = 1, get = 2, set = 3, o = {
async,
get,
set,
};
console.log(o.async, o.get, o.set);
}
expect: {
console.log(1, 2, 3);
}
expect_stdout: "1 2 3"
node_version: ">=6"
}
issue_4269_1: {
options = {
evaluate: true,