10.4.3-1-106-strict.js (576B)
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 info: | 7 Created based on feedback in 8 https://bugs.ecmascript.org/show_bug.cgi?id=333 9 es5id: 10.4.3-1-106 10 description: > 11 Strict mode should not ToObject thisArg if not an object. Return 12 type should be 'number'. 13 flags: [onlyStrict] 14 ---*/ 15 16 Object.defineProperty(Object.prototype, "x", { get: function () { return this; } }); 17 18 assert.sameValue(typeof (5).x, "number", 'typeof (5).x'); 19 20 reportCompare(0, 0);