blob: 4a1b97508f54414e9f2877f29a0b95d9a791ed7f [file] [log] [blame]
function assert(a) {
if (!a)
throw new Error("Bad assertion");
}
function typeOf(n) {
var value = "string";
if (n & 0x1)
value = 1n;
return typeof value;
}
noInline(typeOf);
for (let i = 0; i < 1e6; i++) {
if (i & 0x1)
assert(typeOf(i) === "bigint");
else
assert(typeOf(i) === "string");
}