v/vlib/v/parser/tests/const_index.vv

19 lines
202 B
V

// must not parse 4[deprecated] as index expression
const x = 4
[deprecated]
fn g() {
a := [3]
_ = a[0]
}
const y = 5
[deprecated]
fn h() {}
const z = 6
[typedef]
struct C.Foo{}
a := [3]
_ := a[0]