blob: 5d7caa341aaccde854f6718c193bf7db8f592e35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
let a = [];
a.length = 30;
function check(f) {
try {
f();
} catch (e) {
assertEq(e.message, "too much recursion");
}
}
let f = function() { return f(...a) + 1; };
let g = () => g(...a) + 1;
let h = function() { return new h(...a) + 1; };
check(f);
check(g);
check(h);
|