blob: e7caf9e4c6c8586d7f098def61c73bd3fcd464a2 [file] [log] [blame] [edit]
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/class/elements/async-private-method-static/
name: Static private async method as a ClassExpression element
esid: prod-AsyncMethod
info: |
ClassElement :
static PrivateMethodDefinition
MethodDefinition :
AsyncMethod
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
features: [async-functions, class-static-methods-private]
---*/
var C = class {
static async #method(/*{ params }*/) {
/*{ body }*/
}
static async method(/*{ params }*/) {
return this.#method(/*{ params }*/);
}
}
// Stores a reference `asyncFn` for case evaluation
let asyncFn = C.method.bind(C);