disallow negative indexing

This commit is contained in:
Araq 2015-03-26 17:27:51 +01:00
commit ed0d9e271d
7 changed files with 164 additions and 148 deletions

View file

@ -59,6 +59,12 @@ News
echo x.T
inc x
- **Negative indexing for slicing is deprecated and will be removed in the
next version of the language.** Instead of ``a[0.. -1]`` you can
use ``a[0.. ^1]``. This also works with accessing a single
element ``a[^1]``. Note that we cannot detect this reliably as it is
determined at **runtime** whether negative indexing is used!
Language Additions
------------------