aboutsummaryrefslogtreecommitdiffstats
path: root/src/accessor-names/error/cls-decl-static.template
blob: 1eea03e751df77d839a7cb0c23fac40d4e298c22 (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
26
27
28
// Copyright (C) 2017 Mike Pennisi. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/statements/class/accessor-name-static-
name: Class declaration, static method
esid: sec-runtime-semantics-classdefinitionevaluation
es6id: 14.5.14
info: |
  [...]
  21. For each ClassElement m in order from methods
      a. If IsStatic of m is false, then
         [...]
      b. Else,
         a. Let status be the result of performing PropertyDefinitionEvaluation
            for m with arguments F and false.
---*/

assert.throws(/*{ error }*/, function() {
  class C {
    static get [/*{ name }*/]() {}
  }
}, '`get` accessor');

assert.throws(/*{ error }*/, function() {
  class C {
    static set [/*{ name }*/](_) {}
  }
}, '`set` accessor');