v2 / vlib / v / checker / tests / chan_ref.out
14 lines · 14 sloc · 486 bytes · 44902b5aba005ba88ca22744957320c9d5c0a455
Raw
1vlib/v/checker/tests/chan_ref.vv:10:8: error: cannot push non-reference `St` on `chan &St`
2 8 | fn f(ch chan &St, mut sem sync.Semaphore) {
3 9 | w := St{}
4 10 | ch <- w
5 | ^
6 11 | mut x := St{}
7 12 | ch <- x
8vlib/v/checker/tests/chan_ref.vv:12:8: error: cannot push non-reference `St` on `chan &St`
9 10 | ch <- w
10 11 | mut x := St{}
11 12 | ch <- x
12 | ^
13 13 | // the following works
14 14 | y := &St{}
15