From 2974025010cac7b7238c88c88216c1722e61f5c9 Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Thu, 21 Aug 2014 00:26:14 -0700 Subject: 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. --- tests/expansion.err | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/expansion.err') 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] + ^ -- cgit v1.2.3