mirror of
https://github.com/tc39/test262.git
synced 2025-10-18 14:23:54 +02:00
34 lines
944 B
Plaintext
34 lines
944 B
Plaintext
// Copyright (C) 2019 Caio Lima. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
desc: Calling async arrow function 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, async-functions, arrow-function]
|
|
flags: [async]
|
|
---*/
|
|
|
|
//- elements
|
|
#m = async () => 'test262';
|
|
|
|
method() {
|
|
return this.#m();
|
|
}
|
|
//- assertions
|
|
let c = new C();
|
|
|
|
c.method().then((value) => assert.sameValue(value, 'test262'))
|
|
.then($DONE, $DONE);
|
|
|