blob: 629a9e04307e957e3d635bd649ef1efdc0e2cb16 [file] [log] [blame]
//@ requireOptions('--useBigInt=1')
let toObjectablePrimitives = [true, false, 1, 2, "", Symbol(), BigInt(1)];
for (let primitive of toObjectablePrimitives)
Object.create({}, primitive);
function shouldThrow(props) {
try {
Object.create({}, props);
} catch (e) {
if (!(e instanceof TypeError))
throw e;
}
}
shouldThrow("hello");
shouldThrow(null);