11.1.5_6-3-2.js (683B)
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 info: | 6 Refer 11.1.5; 7 The production 8 PropertyAssignment : get PropertyName ( ) { FunctionBody } 9 3.Let desc be the Property Descriptor{[[Get]]: closure, [[Enumerable]]: true, [[Configurable]]: true} 10 es5id: 11.1.5_6-3-2 11 description: > 12 Object literal - property descriptor for get property assignment 13 should not create a set function 14 ---*/ 15 16 var o; 17 eval("o = {get foo(){return 1;}};"); 18 var desc = Object.getOwnPropertyDescriptor(o,"foo"); 19 20 assert.sameValue(desc.set, undefined, 'desc.set'); 21 22 reportCompare(0, 0);