rcl/golden/error/runtime_std_range_too_big.test
Ruud van Asseldonk ad3d7405bf Simplify call frame handling in evaluation
This time I think I got this one right. There is even the possibility to
omit the call frame for calls to BuiltinMethod and BuiltinFunction, and
then when they get called from a builtin it still works. I initially
thought that that would be useful because those call stacks are so
verbose and add little value, but now I'm not so sure any more that they
add little value, for some errors it *is* helpful to still know the name
of the thing being called, even if you already blame the argument span
and the function name is right next to it.
2024-02-24 21:54:35 +01:00

17 lines
486 B
Text

// We don't test the greatest range that does not fail, to keep the tests fast.
let still_ok = std.range(0, 100);
let err = std.range(10, 1_000_011);
0
# output:
stdin:3:21
3 │ let err = std.range(10, 1_000_011);
╵ ^~~~~~~~~~~~~
Error: Range 10..1000011 exceeds the maximum length of 1000000. The list would require too much memory.
stdin:3:20
3 │ let err = std.range(10, 1_000_011);
╵ ^
In call to function 'std.range'.