mirror of
https://github.com/ruuda/rcl.git
synced 2025-12-23 04:47:19 +00:00
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.
17 lines
486 B
Text
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'.
|