mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
21 lines
234 B
V
21 lines
234 B
V
struct Abc {
|
|
mut:
|
|
flags []Flag
|
|
}
|
|
|
|
enum Flag {
|
|
flag_one
|
|
flag_two
|
|
}
|
|
|
|
fn test_enum_array_field() {
|
|
mut a := Abc{}
|
|
a.flags << .flag_one
|
|
assert true
|
|
a.flags << .flag_two
|
|
assert true
|
|
a.flags << .flag_one
|
|
println(a)
|
|
assert true
|
|
}
|