Gitly
English
Русский
Español
日本語
中文
Português
Pricing
Log in
Register
vxx2
/
vlib
/
v
/
checker
/
tests
/
ref_to_non_ref_err.vv
12
lines
·
10
sloc
·
130 bytes
·
0c8ce3bcb9fd4a2e5bd5f991a5a07da976d780d7
Raw
1
struct Foo {
2
idx int
3
}
4
5
mut list := []Foo{}
6
for i in 0 .. 3 {
7
list << Foo{
8
idx: i
9
}
10
}
11
12
dump(list.index(unsafe { &list[1] }))
13