blob: d4e197cfc2cde969f375cb8ac7163e15ec73290e (
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/expressions/object/accessor-name-
name: Object initializer
esid: sec-object-initializer-runtime-semantics-evaluation
es6id: 12.2.6.8
info: |
ObjectLiteral :
{ PropertyDefinitionList }
{ PropertyDefinitionList , }
1. Let obj be ObjectCreate(%ObjectPrototype%).
2. Let status be the result of performing PropertyDefinitionEvaluation of
PropertyDefinitionList with arguments obj and true.
---*/
assert.throws(/*{ error }*/, function() {
({
get [/*{ name }*/]() {}
});
}, '`get` accessor');
assert.throws(/*{ error }*/, function() {
({
set [/*{ name }*/](_) {}
});
}, '`set` accessor');
|