Debian Codegraph @

js/src/tests/test262/language/expressions/object/method-definition/private-name-early-error-async-fn.js

raw
1 // |reftest| error:SyntaxError
2 // Copyright (C) 2018 Leo Balter. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 esid: sec-method-definitions-static-semantics-early-errors
7 description: >
8 Throws an early SyntaxError if a method definition has a private name
9 (async method).
10 info: |
11 Static Semantics: Early Errors
12
13 PropertyDefinition : MethodDefinition
14 It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
15 negative:
16 phase: parse
17 type: SyntaxError
18 features: [class-methods-private, async-functions]
19 ---*/
20
21 $DONOTEVALUATE();
22
23 var o = {
24 async #m() {}
25 };