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