vxx2 / vlib / v / checker / tests / if_expr_with_none_only.out
15 lines · 15 sloc · 592 bytes · 9760a9c6b258017ed728d323cbcd3f7016c40c3b
Raw
1vlib/v/checker/tests/if_expr_with_none_only.vv:2:10: notice: condition is always true
2 1 | fn main() {
3 2 | a := if true { none } else { none }
4 | ~~~~
5 3 | }
6vlib/v/checker/tests/if_expr_with_none_only.vv:2:2: warning: unused variable: `a`
7 1 | fn main() {
8 2 | a := if true { none } else { none }
9 | ^
10 3 | }
11vlib/v/checker/tests/if_expr_with_none_only.vv:2:7: error: invalid if expression, must supply at least one value other than `none`
12 1 | fn main() {
13 2 | a := if true { none } else { none }
14 | ~~
15 3 | }
16