summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/object/method-definition/private-name-early-error-async-fn.js
blob: d49334f37f1ea0bae7327acef4a2364e94a18b2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// |reftest| error:SyntaxError
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-method-definitions-static-semantics-early-errors
description: >
  Throws an early SyntaxError if a method definition has a private name
  (async method).
info: |
  Static Semantics: Early Errors

  PropertyDefinition : MethodDefinition
    It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
negative:
  phase: parse
  type: SyntaxError
features: [class-methods-private, async-functions]
---*/

$DONOTEVALUATE();

var o = {
  async #m() {}
};