15.2.3.6-4-243-1.js (788B)
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: 15.2.3.6-4-243-1 6 description: > 7 Object.defineProperty - 'O' is an Array, 'name' is an array index 8 named property, 'name' is accessor property and assignment to 9 the accessor property, fails to convert accessor property from 10 accessor property to data property (15.4.5.1 step 4.c) 11 includes: [propertyHelper.js] 12 flags: [noStrict] 13 ---*/ 14 15 16 var arrObj = []; 17 18 function getFunc() { 19 return 3; 20 } 21 Object.defineProperty(arrObj, "1", { 22 get: getFunc, 23 configurable: true 24 }); 25 26 arrObj[1] = 4; 27 28 verifyEqualTo(arrObj, "1", getFunc()); 29 30 verifyProperty(arrObj, "1", { 31 enumerable: false, 32 configurable: true, 33 }); 34 35 reportCompare(0, 0);