tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/freeze/frozen-object-contains-symbol-properties-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.1.2.5 |
| 5 | description: > |
| 6 | Frozen object contains symbol properties. |
| 7 | flags: [onlyStrict] |
| 8 | features: [Symbol] |
| 9 | ---*/ |
| 10 | var sym = Symbol("66"); |
| 11 | var obj = {}; |
| 12 | obj[sym] = 1; |
| 13 | Object.freeze(obj); |
| 14 | |
| 15 | assert.throws(TypeError, function() { |
| 16 | obj[sym] = 2; |
| 17 | }); |