vxx2 / vlib / v / checker / tests / option_with_match_err.out
7 lines · 7 sloc · 333 bytes · 326e43385b09774deab66faee043dcd041b4a091
Raw
1vlib/v/checker/tests/option_with_match_err.vv:4:3: error: `match` expression with Option type only checks against `none`, to match its value you must unwrap it first `var?`
2 2 | mut a := ?int(12)
3 3 | match a {
4 4 | 12 { println(a) }
5 | ~~
6 5 | else { println('else') }
7 6 | }
8