Debian Codegraph @

js/src/tests/test262/language/function-code/10.4.3-1-105.js

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