summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug807623.js
blob: ce16ffd41719bf6387a7a3f5494ec24a1138824d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var objectProxy = new Proxy({}, {});
var functionProxy = new Proxy(function() {}, {});

assertEq(Object.prototype.toString.call(objectProxy), '[object Object]');
assertEq(Object.prototype.toString.call(functionProxy), '[object Function]');
try {
  Function.prototype.toString.call(functionProxy);
  assertEq(true, false);
} catch (e) {
  assertEq(!!/incompatible/.exec(e), true);
}
try {
  Function.prototype.toString.call(objectProxy);
  assertEq(true, false);
} catch (e) {
  assertEq(!!/incompatible/.exec(e), true);
}