mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: check argument for chan.try_push/pop()
(#9798)
This commit is contained in:
@ -2904,7 +2904,7 @@ println(l)
|
||||
println(c)
|
||||
mut b := Abc{}
|
||||
ch2 := chan Abc{}
|
||||
res2 := ch2.try_pop(b) // try to perform `b = <-ch2`
|
||||
res2 := ch2.try_pop(mut b) // try to perform `b = <-ch2`
|
||||
```
|
||||
|
||||
The `try_push/pop()` methods will return immediately with one of the results
|
||||
|
Reference in New Issue
Block a user