Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Symbol/auto-boxing-strict.js

raw
1 // Copyright (C) 2013 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 19.4
5 description: >
6 Symbol ToObject auto-boxing
7 flags: [onlyStrict]
8 features: [Symbol]
9 ---*/
10
11 assert.throws(TypeError, function() {
12 var sym = Symbol('66');
13 sym.a = 0;
14 });
15
16 assert.throws(TypeError, function() {
17 var sym = Symbol('66');
18 sym['a' + 'b'] = 0;
19 });
20
21 assert.throws(TypeError, function() {
22 var sym = Symbol('66');
23 sym[62] = 0;
24 });