v4 / vlib / v / checker / tests / nil_compare_err.out
14 lines · 14 sloc · 411 bytes · ceac4baf870f76f7bebc5f636507b11fc31c4148
Raw
1vlib/v/checker/tests/nil_compare_err.vv:3:6: error: cannot compare with `nil` because `[]int` is not a pointer
2 1 | a := [12, 34, 56]
3 2 |
4 3 | if a != unsafe { nil } {
5 | ~~
6 4 | println(a)
7 5 | }
8vlib/v/checker/tests/nil_compare_err.vv:7:7: error: cannot use `>` with `nil`
9 5 | }
10 6 |
11 7 | if 23 > unsafe { nil } {
12 | ^
13 8 | println('hey')
14 9 | }
15