js/src/jit-test/tests/basic/spread-call-recursion.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:0c90c0e3f2c7
1 let a = [];
2 a.length = 30;
3
4 function check(f) {
5 try {
6 f();
7 } catch (e) {
8 assertEq(e.message, "too much recursion");
9 }
10 }
11
12 let f = function() f(...a) + 1;
13 let g = () => g(...a) + 1;
14 let h = function() new h(...a) + 1;
15
16 check(f);
17 check(g);
18 check(h);

mercurial