summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/WeakMap/symbols.js
blob: 68d6518f2a243cedacba718cc19aac1677565e0d (plain)
1
2
3
4
5
6
7
8
9
10
/* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/ */

// Symbols can't be WeakMap keys.
var m = new WeakMap;
var sym = Symbol();
assertThrowsInstanceOf(() => m.set(sym, 0), TypeError);

if (typeof reportCompare === "function")
  reportCompare(0, 0);