Revision control

Copy as Markdown

// Copyright (C) 2017 Mike Pennisi. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/class/accessor-name-static-
name: Class expression, 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() {
0, class {
static get [/*{ name }*/]() {}
};
}, '`get` accessor');
assert.throws(/*{ error }*/, function() {
0, class {
static set [/*{ name }*/](_) {}
};
}, '`set` accessor');