private-field-as-async-function.js (1101B)
1 // |reftest| async 2 // This file was procedurally generated from the following sources: 3 // - src/class-elements/private-field-as-async-function.case 4 // - src/class-elements/default/cls-decl.template 5 /*--- 6 description: Calling async function returned from private field access (field definitions in a class declaration) 7 esid: prod-FieldDefinition 8 features: [class-fields-private, async-functions, 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 function() { return '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);