Emit an error message on literal zero indices

Mostly resolves #4862, though there remains the lingering question of
whether or not to emit a warning to /dev/tty or stderr when a
non-literal-zero index evaluates to zero.
This commit is contained in:
Mahmoud Al-Qudsi
2018-10-01 20:54:55 -05:00
parent 5b696b5fb5
commit 264d8270a7
5 changed files with 34 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
fish: array indices start at 1, not 0.
echo $foo[0]
^
fish: array indices start at 1, not 0.
echo $foo[ 0 ]
^
fish: array indices start at 1, not 0.
echo $foo[ 00 ]
^