You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following program
http://play.golang.org/p/JAKJ9WVL00
is accepted w/o compilation error. However, a send statement is a regular statement and
cannot be parenthesized. This is probably an artifact from the time when sends were
expressions.
gccgo reports an error:
$ cat x.go
package main
func main() {
var ch chan int
(ch<-0)
}
$ gccgo x.go
x.go:5:9: error: missing ')'
(ch<-0)
^
x.go:5:12: error: expected ';' or '}' or newline
(ch<-0)
^
And so does gotype:
$ gotype x.go
x.go:5:5: expected ')', found '<-'
x.go:6:2: expected '}', found 'EOF'