Imported Upstream version 1.0.0
[platform/upstream/js.git] / js / src / jit-test / tests / basic / testProxyConstructors.js
1 // |jit-test| error: ExitCleanly
2
3 // proxies can return primitives
4 assertEq(new (Proxy.createFunction({}, function(){}, function(){})), undefined);
5
6 x = Proxy.createFunction((function () {}), Uint16Array, wrap)
7 new(wrap(x))
8
9 // proxies can return the callee
10 var x = Proxy.createFunction({}, function (q) { return q; });
11 new x(x);
12
13 // not an error
14 new (Proxy.createFunction({}, "".indexOf));
15
16 throw "ExitCleanly"