Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
fmt
/
tests
/
struct_fixed_array_enum_cast_keep.vv
16
lines
·
13
sloc
·
165 bytes
·
fc8ef0e70cdb75713db4cc149df78cc1fb5e95fe
Raw
1
module main
2
3
enum TestEnum {
4
one
5
two
6
_max
7
}
8
9
struct Test1 {
10
list [int(TestEnum._max)]int
11
}
12
13
fn main() {
14
t := Test1{}
15
assert t.list.len == int(TestEnum._max)
16
}
17