summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug807623.js
blob: 35c34d3cb39f0ca6f54c67f4e077893552c34472 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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(objectProxy);
  assertEq(true, false);
} catch (e) {
  assertEq(!!/incompatible/.exec(e), true);
}