15.2.3.6-4-293-4-strict.js (1048B)
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: 15.2.3.6-4-293-4 7 description: > 8 Object.defineProperty - 'O' is an Arguments object of a function 9 that has formal parameters, 'name' is own data property of 'O' 10 which is also defined in [[ParameterMap]] of 'O', test TypeError 11 is not thrown when updating the [[Value]] attribute value of 12 'name' which is defined as non-writable and configurable (10.6 13 [[DefineOwnProperty]] step 3 and step 5.b) 14 includes: [propertyHelper.js] 15 flags: [onlyStrict] 16 ---*/ 17 18 (function(a, b, c) { 19 Object.defineProperty(arguments, "0", { 20 value: 10, 21 writable: false, 22 }); 23 Object.defineProperty(arguments, "0", { 24 value: 20 25 }); 26 if (a !== 0) { 27 throw new Test262Error('Expected "a === 0", actually ' + a); 28 } 29 30 verifyProperty(arguments, "0", { 31 value: 20, 32 writable: false, 33 enumerable: true, 34 configurable: true, 35 }); 36 }(0, 1, 2)); 37 38 reportCompare(0, 0);