Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/compound-assignment/11.13.2-41-s.js

raw
1 // Copyright (c) 2012 Ecma International. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 es5id: 11.13.2-41-s
6 description: >
7 Strict Mode - TypeError is thrown if The LeftHandSide of a
8 Compound Assignment operator(>>>=) is a reference to an accessor
9 property with the attribute value {[[Set]]:undefined}
10 flags: [onlyStrict]
11 ---*/
12
13 var obj = {};
14 Object.defineProperty(obj, "prop", {
15 get: function () {
16 return 11;
17 },
18 set: undefined,
19 enumerable: true,
20 configurable: true
21 });
22 assert.throws(TypeError, function() {
23 obj.prop >>>= 20;
24 });
25 assert.sameValue(obj.prop, 11, 'obj.prop');