diff options
author | Kevin Ballard <kevin@sb.org> | 2014-08-21 00:26:14 -0700 |
---|---|---|
committer | Kevin Ballard <kevin@sb.org> | 2014-08-21 01:10:07 -0700 |
commit | 2974025010cac7b7238c88c88216c1722e61f5c9 (patch) | |
tree | fa1c717f77ca5c6df0e2563e5b912aeb65d7b5b0 /tests/expansion.err | |
parent | 9a90e041f38e0b2497b999d1678377986d3d49f4 (diff) |
Fix error span for invalid slice indexes
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.
Diffstat (limited to 'tests/expansion.err')
-rw-r--r-- | tests/expansion.err | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/expansion.err b/tests/expansion.err index 6346f23f..e60c203d 100644 --- a/tests/expansion.err +++ b/tests/expansion.err @@ -16,3 +16,15 @@ 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] + ^ |