v/vlib/v/fmt/tests/array_slices_expected.vv

13 lines
192 B
V
Raw Normal View History

fn fn_contains_index_expr() {
arr := [1, 2, 3, 4, 5]
a := 1 in arr[0..]
2020-04-25 17:49:16 +02:00
_ := a
_ := 1 in arr[..2]
_ := 1 in arr[1..3]
d := arr[2]
2020-04-25 17:49:16 +02:00
_ := d
_ := arr[2..]
_ := arr[..2]
_ := arr[1..3]
}