| 1 | vlib/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 | } |
| 7 | vlib/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 | } |
| 14 | vlib/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 |