v/vlib/v/checker/tests/chan_args.out

29 lines
1.1 KiB
Plaintext

vlib/v/checker/tests/chan_args.vv:4:19: error: cannot use `int` as `&f64` in argument 1 to `chan f64.try_push`
2 | ch := chan f64{cap: 5}
3 | a := 2
4 | _ := ch.try_push(a)
| ^
5 | _ := ch.try_push(2.5)
6 | b := 2.5
vlib/v/checker/tests/chan_args.vv:5:19: error: cannot use `float literal` as `&f64` in argument 1 to `chan f64.try_push`
3 | a := 2
4 | _ := ch.try_push(a)
5 | _ := ch.try_push(2.5)
| ~~~
6 | b := 2.5
7 | _ := ch.try_pop(b)
vlib/v/checker/tests/chan_args.vv:7:18: error: method `try_pop` parameter `obj` is `mut`, so use `mut b` instead
5 | _ := ch.try_push(2.5)
6 | b := 2.5
7 | _ := ch.try_pop(b)
| ^
8 | // this should work:
9 | _ := ch.try_push(b)
vlib/v/checker/tests/chan_args.vv:11:22: error: cannot use `int` as argument for `try_pop` (`f64` expected)
9 | _ := ch.try_push(b)
10 | mut c := 7
11 | _ := ch.try_pop(mut c)
| ^
12 | mut x := 12.5
13 | // this should work: