v/vlib/v/checker/tests/array_index.vv

12 lines
148 B
V

fn fixed() {
a := [1,2]!
_ = a[0.2]
_ = a[1] // OK
_ = a[-1]
_ = a[2]
_ = a[1..2] // OK
_ = a[2..2] // empty, OK
_ = a[1..3]
_ = a[3..3]
}