set-accsr-inside-func-expr-runtime.js (846B)
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 esid: use-strict-directive 6 es5id: 10.1.1-18-s 7 description: > 8 Strict Mode - Function code that is part of a Accessor 9 PropertyAssignment is in Strict Mode if Accessor 10 PropertyAssignment is contained in use strict(setter) 11 flags: [noStrict] 12 ---*/ 13 14 var data = "data"; 15 16 assert.throws(ReferenceError, function() { 17 "use strict"; 18 19 var obj = {}; 20 Object.defineProperty(obj, "accProperty", { 21 set: function (value) { 22 test262unresolvable = null; 23 data = value; 24 } 25 }); 26 27 obj.accProperty = "overrideData"; 28 }); 29 30 assert.sameValue(data, "data", 'data unchanged'); 31 32 reportCompare(0, 0);