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