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