mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
2974025010
The span now properly points at the token that was invalid, rather than the start of the slice. Also fix the span for `()[1]` and `()[d]`, which were previously reporting no source location at all.
30 lines
628 B
Text
30 lines
628 B
Text
Array index out of bounds
|
|
fish: show "$foo[2]"
|
|
^
|
|
Array index out of bounds
|
|
fish: show $foo[2]
|
|
^
|
|
Array index out of bounds
|
|
fish: show "$foo[1 2]"
|
|
^
|
|
Array index out of bounds
|
|
fish: show $foo[1 2]
|
|
^
|
|
Array index out of bounds
|
|
fish: show "$foo[2 1]"
|
|
^
|
|
Array index out of bounds
|
|
fish: show $foo[2 1]
|
|
^
|
|
Invalid index value
|
|
fish: echo "$foo[d]"
|
|
^
|
|
Invalid index value
|
|
fish: echo $foo[d]
|
|
^
|
|
Array index out of bounds
|
|
fish: echo ()[1]
|
|
^
|
|
Invalid index value
|
|
fish: echo ()[d]
|
|
^
|