vxx2 / vlib / v / checker / tests / match_cond_with_parenthesis_err.vv
22 lines · 18 sloc · 168 bytes · 791972ebc9912881e706a55f1491f0684b0218ca
Raw
1module main
2
3enum Enum {
4 a
5 b
6 c
7}
8
9fn foo() ?Enum {
10 return .a
11}
12
13fn bar() bool {
14 return match (foo()) {
15 .a { true }
16 .b, .c { false }
17 }
18}
19
20fn main() {
21 bar()
22}
23