rcl/golden/error/recursion_stack_overflow_field.test
Ruud van Asseldonk 636ea97039 Update golden output for new type error messages
Not all of them are improvements, sometimes the runtime error can give
better context than the static type error. I need to edit the type
expectation machinery to allow a _reason_ for the expectation, but we
can do that at some later time. For now let's get all the tests to pass.
2024-02-24 21:43:39 +01:00

44 lines
1,005 B
Text

// Even with a limit on the depth of function calls, if every call causes a very
// deep stack frame, for example due to naively evaluating unary operators, we
// can still overflow the native stack.
let f = f => {{f(f).x}.x.c};
f(f)
# output:
stdin:4:16
4 │ let f = f => {{f(f).x}.x.c};
╵ ^~~~
Error: Evaluation budget exceeded. This expression exceeds the maximum evaluation depth of 150.
stdin:4:17
4 │ let f = f => {{f(f).x}.x.c};
╵ ^
In call to function.
stdin:4:17
4 │ let f = f => {{f(f).x}.x.c};
╵ ^
In call to function.
stdin:4:17
4 │ let f = f => {{f(f).x}.x.c};
╵ ^
In call to function.
stdin:4:17
4 │ let f = f => {{f(f).x}.x.c};
╵ ^
In call to function.
stdin:4:17
4 │ let f = f => {{f(f).x}.x.c};
╵ ^
In call to function.
Note: The call stack is too deep to display in full. Only the innermost calls are shown above.