Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
consts
/
const_global_arr_test.v
17
lines
·
14
sloc
·
203 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
struct
Foo {
2
index int
3
}
4
5
const
foo5 = Foo{
6
index: 5
7
}
8
const
foo2 = Foo{
9
index: 2
10
}
11
12
const
foos = [foo5.index, foo2.index]!
13
14
fn
test_main() {
15
fooz := [foo5.index, foo2.index]!
16
assert foos == fooz
17
}
18