Open
Description
Consider this program:
package main
import (
"fmt"
)
type Foo chan string
func main() {
c := make(Foo, 1)
c <- "gotcha"
fmt.Println(<-c)
}
All is well. Now try to declare a direction for a Foo:
package main
type Foo chan string
func main() {
var x <-Foo
}
// or
func x(c <-Foo) { }
This doesn't parse, but it's reasonable to expect it would and maybe, perhaps with parenthesization, easy to define without ambiguity. (A directional Foo with element type Foo could be tricky.)
Reported on twitter.