vxx2 / vlib / v / checker / tests / sum.out
28 lines · 28 sloc · 855 bytes · c58b04bcbfad593c60e3849dfb7df3b2a1d7fc7d
Raw
1vlib/v/checker/tests/sum.vv:5:8: error: cannot cast non-sum type `int` using `as`
2 3 | fn non_sum() {
3 4 | v := 4
4 5 | _ = v as rune
5 | ~~
6 6 | _ = v as Var
7 7 | }
8vlib/v/checker/tests/sum.vv:6:8: error: cannot cast non-sum type `int` using `as` - use e.g. `Var(some_expr)` instead.
9 4 | v := 4
10 5 | _ = v as rune
11 6 | _ = v as Var
12 | ~~
13 7 | }
14 8 |
15vlib/v/checker/tests/sum.vv:10:7: error: cannot cast `rune` to `Var`
16 8 |
17 9 | fn sum() {
18 10 | _ := Var(`J`)
19 | ~~~~~~~~
20 11 | mut s2 := Var('')
21 12 | s2 = true
22vlib/v/checker/tests/sum.vv:12:7: error: cannot assign to `s2`: expected `Var`, not `bool`
23 10 | _ := Var(`J`)
24 11 | mut s2 := Var('')
25 12 | s2 = true
26 | ~~~~
27 13 | _ = s2
28 14 | }
29