v4 / vlib / v / checker / tests / if_expr_mismatch.out
12 lines · 12 sloc · 420 bytes · 9760a9c6b258017ed728d323cbcd3f7016c40c3b
Raw
1vlib/v/checker/tests/if_expr_mismatch.vv:2:10: notice: condition is always true
2 1 | fn main() {
3 2 | s := if true { '12' } else { 12 }
4 | ~~~~
5 3 | println(s)
6 4 | }
7vlib/v/checker/tests/if_expr_mismatch.vv:2:7: error: mismatched types `string` and `int literal`
8 1 | fn main() {
9 2 | s := if true { '12' } else { 12 }
10 | ~~
11 3 | println(s)
12 4 | }
13