mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 02:15:41 +08: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.
31 lines
628 B
Plaintext
31 lines
628 B
Plaintext
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]
|
|
^
|