v2 / vlib / v / checker / tests / chan_mut.out
35 lines · 35 sloc · 1.13 KB · 0c8ce3bcb9fd4a2e5bd5f991a5a07da976d780d7
Raw
1vlib/v/checker/tests/chan_mut.vv:8:8: error: `v` is immutable, declare it with `mut` to make it mutable
2 6 | fn f(ch chan mut St) {
3 7 | v := St{}
4 8 | ch <- v
5 | ^
6 9 | mut w := St{}
7 10 | ch <- w
8vlib/v/checker/tests/chan_mut.vv:8:8: error: cannot push non-reference `St` on `chan mut St`
9 6 | fn f(ch chan mut St) {
10 7 | v := St{}
11 8 | ch <- v
12 | ^
13 9 | mut w := St{}
14 10 | ch <- w
15vlib/v/checker/tests/chan_mut.vv:10:8: error: cannot push non-reference `St` on `chan mut St`
16 8 | ch <- v
17 9 | mut w := St{}
18 10 | ch <- w
19 | ^
20 11 | x := &St{}
21 12 | ch <- x
22vlib/v/checker/tests/chan_mut.vv:12:8: error: `x` is immutable, declare it with `mut` to make it mutable
23 10 | ch <- w
24 11 | x := &St{}
25 12 | ch <- x
26 | ^
27 13 | mut y := St{}
28 14 | ch <- y
29vlib/v/checker/tests/chan_mut.vv:14:8: error: cannot push non-reference `St` on `chan mut St`
30 12 | ch <- x
31 13 | mut y := St{}
32 14 | ch <- y
33 | ^
34 15 | mut z := &St{
35 16 | n: 7
36