blob: cb6654aad55e52b1ac348f63f95a6aa016bcb014 [file] [log] [blame]
function assert(x) {
if (!x)
throw new Error("Bad assertion!");
}
const seenGetters = new WeakSet();
for (const [key, desc] of Object.entries(Object.getOwnPropertyDescriptors(RegExp))) {
if (!/^\$\d$/.test(key))
continue;
assert(typeof desc.get === "function");
assert(!seenGetters.has(desc.get));
seenGetters.add(desc.get);
}