summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/collections/WeakSet-constructor.js
blob: a89e8fc0c856f968da683df05fd590970fc24e3a (plain)
1
2
3
4
5
6
7
8
9
var list = [Number, Function];

var ws = new WeakSet(list);
assertEq(ws.has(Number), true);
assertEq(ws.has(Function), true);

ws = new WeakSet(new Set(list));
assertEq(ws.has(Number), true);
assertEq(ws.has(Function), true);