blob: c54f4b867f913af67565d20eda6d05249b870c19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
let ta = new BigInt64Array(10);
let obj = {
get length() {
detachArrayBuffer(ta.buffer);
return 1;
},
0: {
valueOf() {
return "huzzah!";
}
},
};
// Throws a SyntaxError, because "huzzah!" can't be parsed as a BigInt.
assertThrowsInstanceOf(() => ta.set(obj), SyntaxError);
if (typeof reportCompare === "function")
reportCompare(true, true);
|