v2 / vlib / v / checker / tests / if_non_bool_cond.out
20 lines · 20 sloc · 631 bytes · e534b4397da6905b7fb1c78169bf82f2a54708e1
Raw
1vlib/v/checker/tests/if_non_bool_cond.vv:2:5: error: non-bool type `string` used as if condition
2 1 | fn main() {
3 2 | if '10' {
4 | ~~~~
5 3 | println('10')
6 4 | }
7vlib/v/checker/tests/if_non_bool_cond.vv:6:5: error: non-bool type `int literal` used as if condition
8 4 | }
9 5 |
10 6 | if 5 {
11 | ^
12 7 | println(5)
13 8 | }
14vlib/v/checker/tests/if_non_bool_cond.vv:10:5: error: non-bool type `void` used as if condition
15 8 | }
16 9 |
17 10 | if println('v') {
18 | ~~~~~~~~~~~~
19 11 | println('println')
20 12 | }
21