| // Copyright (C) 2019 Caio Lima. All rights reserved. | |
| // This code is governed by the BSD license found in the LICENSE file. | |
| /*--- | |
| desc: Calling result returned from private field access | |
| info: | | |
| Updated Productions | |
| CallExpression[Yield, Await]: | |
| CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await] | |
| SuperCall[?Yield, ?Await] | |
| CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await] | |
| CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]] | |
| CallExpression[?Yield, ?Await].IdentifierName | |
| CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await] | |
| CallExpression[?Yield, ?Await].PrivateName | |
| template: default | |
| features: [class-fields-private] | |
| ---*/ | |
| //- elements | |
| #m = function () { return 'test262'; }; | |
| method() { | |
| return this.#m(); | |
| } | |
| //- assertions | |
| let c = new C(); | |
| assert.sameValue(c.method(), 'test262'); |