summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug686396.js
blob: 8123fc99c3e7a8cd11177fdd2c7a8382786db012 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

(function () { 
  assertEquals = function assertEquals(expected, found, name_opt) {  };
})();
function testOne(receiver, key, result) {
  for(var i = 0; i != 10; i++ ) {
    assertEquals(result, receiver[key]());
  }
}
function TypeOfThis() { return typeof this; }
Number.prototype.type = TypeOfThis;
String.prototype.type = TypeOfThis;
Boolean.prototype.type = TypeOfThis;
testOne(2.3, 'type', 'object');
testOne('x', 'type', 'object');
testOne(true, 'type', 'object');