Debian Codegraph @

js/src/tests/test262/language/expressions/compound-assignment/11.13.2-45-s-strict.js

raw
1 'use strict';
2 // Copyright (c) 2012 Ecma International. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 es5id: 11.13.2-45-s
7 description: >
8 Strict Mode - TypeError is thrown if The LeftHandSide of a
9 Compound Assignment operator(*=) is a reference to a non-existent
10 property of an object whose [[Extensible]] internal property is
11 false
12 flags: [onlyStrict]
13 ---*/
14
15 var obj = {};
16 Object.preventExtensions(obj);
17 assert.throws(TypeError, function() {
18 obj.len *= 10;
19 });
20
21 reportCompare(0, 0);