aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/expansion.in
diff options
context:
space:
mode:
authorGravatar Kevin Ballard <kevin@sb.org>2014-08-21 00:26:14 -0700
committerGravatar Kevin Ballard <kevin@sb.org>2014-08-21 01:10:07 -0700
commit2974025010cac7b7238c88c88216c1722e61f5c9 (patch)
treefa1c717f77ca5c6df0e2563e5b912aeb65d7b5b0 /tests/expansion.in
parent9a90e041f38e0b2497b999d1678377986d3d49f4 (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.in')
-rw-r--r--tests/expansion.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/expansion.in b/tests/expansion.in
index 8b48772e..a2225127 100644
--- a/tests/expansion.in
+++ b/tests/expansion.in
@@ -74,3 +74,9 @@ show "$foo[1 2]"
show $foo[1 2]
show "$foo[2 1]"
show $foo[2 1]
+
+echo "$foo[d]"
+echo $foo[d]
+
+echo ()[1]
+echo ()[d]