| 1 |
// |reftest| module |
| 2 |
// This file was procedurally generated from the following sources: |
| 3 |
// - src/top-level-await/await-expr-new-expr.case |
| 4 |
// - src/top-level-await/syntax/export-dflt-class-decl.template |
| 5 |
/*--- |
| 6 |
description: AwaitExpression new MemberExpression (Valid syntax for top level await in export default ClassDeclaration) |
| 7 |
esid: prod-AwaitExpression |
| 8 |
features: [top-level-await, class] |
| 9 |
flags: [generated, module] |
| 10 |
info: | |
| 11 |
ModuleItem: |
| 12 |
StatementListItem[~Yield, +Await, ~Return] |
| 13 |
|
| 14 |
... |
| 15 |
|
| 16 |
UnaryExpression[Yield, Await] |
| 17 |
[+Await]AwaitExpression[?Yield] |
| 18 |
|
| 19 |
AwaitExpression[Yield]: |
| 20 |
await UnaryExpression[?Yield, +Await] |
| 21 |
|
| 22 |
... |
| 23 |
|
| 24 |
ExportDeclaration: |
| 25 |
export * FromClause ; |
| 26 |
export ExportClause FromClause ; |
| 27 |
export ExportClause ; |
| 28 |
export VariableStatement[~Yield, +Await] |
| 29 |
export Declaration[~Yield, +Await] |
| 30 |
export defaultHoistableDeclaration[~Yield, +Await, +Default] |
| 31 |
export defaultClassDeclaration[~Yield, +Await, +Default] |
| 32 |
export default[lookahead ∉ { function, async [no LineTerminator here] function, class }]AssignmentExpression[+In, ~Yield, ~Await]; |
| 33 |
|
| 34 |
Declaration[Yield, Await]: |
| 35 |
HoistableDeclaration[?Yield, ?Await, ~Default] |
| 36 |
ClassDeclaration[?Yield, ?Await, ~Default] |
| 37 |
LexicalDeclaration[+In, ?Yield, ?Await] |
| 38 |
|
| 39 |
ClassDeclaration[Yield, Await, Default]: |
| 40 |
classBindingIdentifier[?Yield, ?Await] ClassTail[?Yield, ?Await] |
| 41 |
[+Default] class ClassTail[?Yield, ?Await] |
| 42 |
|
| 43 |
ClassTail[Yield, Await]: |
| 44 |
ClassHeritage[?Yield, ?Await]_opt { ClassBody[?Yield, ?Await]_opt } |
| 45 |
|
| 46 |
|
| 47 |
LeftHandSideExpression[Yield, Await]: |
| 48 |
NewExpression[?Yield, ?Await] |
| 49 |
CallExpression[?Yield, ?Await] |
| 50 |
|
| 51 |
NewExpression[Yield, Await]: |
| 52 |
MemberExpression[?Yield, ?Await] |
| 53 |
new NewExpression[?Yield, ?Await] |
| 54 |
|
| 55 |
MemberExpression[Yield, Await]: |
| 56 |
... |
| 57 |
new MemberExpression[?Yield, ?Await] Arguments[?Yield, ?Await] |
| 58 |
|
| 59 |
---*/ |
| 60 |
|
| 61 |
|
| 62 |
function fn() { |
| 63 |
return function() {}; |
| 64 |
} |
| 65 |
// extends CallExpression with arguments |
| 66 |
export default class extends fn(await new Promise(function(res, rej) { res(1); })) {}; |
| 67 |
|
| 68 |
reportCompare(0, 0); |