v2 / vlib / v / tests / options / option_enum_compare_none_test.v
17 lines · 16 sloc · 171 bytes · 58c5f189949305f77e8a5f7c36b0640bdfc1d17d
Raw
1enum A_ {
2 b
3}
4
5fn test_main() {
6 mut a := ?A_(none)
7 a = .b
8 b := ?A_(none)
9 match true {
10 a == ?A_(.b) && a != b {
11 assert true
12 }
13 else {
14 assert false
15 }
16 }
17}
18