blob: f5d7e6069788ee685000edfc3699df24a3164855 [file] [log] [blame]
//@ skip
function test(a) {
var x = [1337, ...a, ...a, ...a, ...a, ...a];
}
noInline(test);
function doTest(a, shouldThrow) {
var exception;
try {
test(a);
} catch (e) {
exception = e;
}
if (shouldThrow && exception != "RangeError: Out of memory")
throw("FAILED");
}
var a = new Array(0x40000);
doTest(a, true);