rcl/golden/error/recursion_stack_overflow_4.test
Ruud van Asseldonk bb34ecb643 Adjust stack depth counter again to avoid overflow
The bad input 3 was discovered by the fuzzer after I did the expansion.
I fixed it by lowering the limit, then it immediately discovered input
4 which had the same structure. So the right solution here is to add
more depth counters. It might mean that we double-count function calls,
but it does help.
2024-02-24 21:54:35 +01:00

42 lines
919 B
Text

// This is a regression test for an input that caused stack overflow.
let f = f => f(f)()()()()()()()()();
f(f)
# output:
stdin:2:14
2 │ let f = f => f(f)()()()()()()()()();
╵ ^~~~
Error: Evaluation budget exceeded. This expression exceeds the maximum evaluation depth of 150.
stdin:2:15
2 │ let f = f => f(f)()()()()()()()()();
╵ ^
In call to function.
stdin:2:15
2 │ let f = f => f(f)()()()()()()()()();
╵ ^
In call to function.
stdin:2:15
2 │ let f = f => f(f)()()()()()()()()();
╵ ^
In call to function.
stdin:2:15
2 │ let f = f => f(f)()()()()()()()()();
╵ ^
In call to function.
stdin:2:15
2 │ let f = f => f(f)()()()()()()()()();
╵ ^
In call to function.
Note: The call stack is too deep to display in full. Only the innermost calls are shown above.