summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/object/method-definition/private-name-early-error-async-gen.js
blob: ff4c60026626c4bf344df176c85363658c8e7949 (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 generator)
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-iteration]
---*/

$DONOTEVALUATE();

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