vxx2 / vlib / v / checker / tests / match_cond_with_parenthesis_err.out
21 lines · 21 sloc · 985 bytes · 787d774523226b06e38df58610c8419fda40ce06
Raw
1vlib/v/checker/tests/match_cond_with_parenthesis_err.vv:14:15: warning: unnecessary `()` in `match` condition, use `match expr {` instead of `match (expr) {`.
2 12 |
3 13 | fn bar() bool {
4 14 | return match (foo()) {
5 | ~~~~~~~
6 15 | .a { true }
7 16 | .b, .c { false }
8vlib/v/checker/tests/match_cond_with_parenthesis_err.vv:15:3: error: `match` expression with Option type only checks against `none`, to match its value you must unwrap it first `var?`
9 13 | fn bar() bool {
10 14 | return match (foo()) {
11 15 | .a { true }
12 | ~~
13 16 | .b, .c { false }
14 17 | }
15vlib/v/checker/tests/match_cond_with_parenthesis_err.vv:16:3: error: `match` expression with Option type only checks against `none`, to match its value you must unwrap it first `var?`
16 14 | return match (foo()) {
17 15 | .a { true }
18 16 | .b, .c { false }
19 | ~~~~~~
20 17 | }
21 18 | }
22