ref: efef5c18f16cbff92400e6198ddb666b640a6adc
parent: 5c12b2816f7feeafb5e3e52ee287bf33927a1c74
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Jan 29 19:29:31 EST 2017
Specify bounds checking.
--- a/doc/lang.txt
+++ b/doc/lang.txt
@@ -1384,8 +1384,8 @@
`idx`th value in the sequence is referred to. This expression
produces an lvalue.
- If `idx` is larger than `expr.len`, then the program must
- terminate.
+ If `idx` is larger than `expr.len` or smaller than 0, then the
+ program must terminate.
Type:
@@ -1403,6 +1403,9 @@
If the lower bound is omitted, then it is implicitly zero. If the
upper bound is ommitted, then it is implicitly `expr.len`.
+
+ If the bounds are not fully contained within the slice being
+ indexed, the program must terminate.
Type: