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
package p
var c chan int
var x int = <-chan int(c)
produces a syntax error:
x.go:3:13: expected expression
but it should be interpreted as:
package p
var c chan int
var x int = <-(chan int)(c)
According to the spec, <-chan int(c) is not a conversion (
http://tip.golang.org/ref/spec#Conversions ); this is even true under consideration of
issue #4109 (documentation error in the spec).
The gc compiler accepts this code.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: