2019-05-15 16:29:19 -06:00
|
|
|
package channel
|
|
|
|
|
|
|
|
func _() {
|
|
|
|
var (
|
|
|
|
aa = "123" //@item(channelAA, "aa", "string", "var")
|
|
|
|
ab = 123 //@item(channelAB, "ab", "int", "var")
|
|
|
|
)
|
|
|
|
|
|
|
|
{
|
|
|
|
type myChan chan int
|
|
|
|
var mc myChan
|
|
|
|
mc <- a //@complete(" //", channelAB, channelAA)
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
var ac chan int //@item(channelAC, "ac", "chan int", "var")
|
|
|
|
a <- a //@complete(" <-", channelAC, channelAA, channelAB)
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
var foo chan int //@item(channelFoo, "foo", "chan int", "var")
|
|
|
|
wantsInt := func(int) {} //@item(channelWantsInt, "wantsInt", "func(int)", "var")
|
2019-12-22 10:58:14 -07:00
|
|
|
wantsInt(<-) //@rank(")", channelFoo, channelAB)
|
2019-05-15 16:29:19 -06:00
|
|
|
}
|
|
|
|
}
|