| // Copyright (C) 2018 Bloomberg LP. All rights reserved. | |
| // This code is governed by the BSD license found in the LICENSE file. | |
| /*--- | |
| path: language/statements/class/elements/async-private-method-static/ | |
| name: Static async private method as a ClassDeclaration 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] | |
| ---*/ | |
| class C { | |
| 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); |