Debian Codegraph @

js/src/tests/test262/language/statements/class/elements/private-field-as-async-arrow-function.js

raw
1 // |reftest| async
2 // This file was procedurally generated from the following sources:
3 // - src/class-elements/private-field-as-async-arrow-function.case
4 // - src/class-elements/default/cls-decl.template
5 /*---
6 description: Calling async arrow function returned from private field access (field definitions in a class declaration)
7 esid: prod-FieldDefinition
8 features: [class-fields-private, async-functions, arrow-function, class]
9 flags: [generated, async]
10 info: |
11 Updated Productions
12
13 CallExpression[Yield, Await]:
14 CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
15 SuperCall[?Yield, ?Await]
16 CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
17 CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
18 CallExpression[?Yield, ?Await].IdentifierName
19 CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
20 CallExpression[?Yield, ?Await].PrivateName
21
22 ---*/
23
24
25 class C {
26 #m = async () => 'test262';
27
28 method() {
29 return this.#m();
30 }
31 }
32
33 let c = new C();
34
35 c.method().then((value) => assert.sameValue(value, 'test262'))
36 .then($DONE, $DONE);
37