weaking unsigned/signed indexing requirements in order to not break too much existing code

This commit is contained in:
Araq 2019-09-02 12:07:27 +02:00
commit 23c44f009a
2 changed files with 11 additions and 5 deletions

View file

@ -136,3 +136,9 @@ block:
const x11: range[0'f..1'f] = 2'f
reject:
const x12: range[0'f..1'f] = 2
# ensure unsigned array indexing is remains lenient:
var a: array[4'u, string]
for i in 0..<a.len:
a[i] = "foo"