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
In Go 1.4.1, gofmt reformats chan <-chan int to chan<- chan int. The two are different in the AST, and indeed gofmt can break working source; see http://play.golang.org/p/L9xzobGwob for an example.
I'm using Ubuntu amd64. It is reproducible on my machine and in the Playground as follows:
Run. This succeeds.
Format. This succeeds.
Run. This fails.
The text was updated successfully, but these errors were encountered:
"chan <-chan int" is parsed as "chan<- (chan int)", so if you want "chan (<-chan int)",
you have to use parenthesis. Thus gofmt is actually correct to reformat that way, and
it shows the actual meaning of that type.
In Go 1.4.1,
gofmt
reformatschan <-chan int
tochan<- chan int
. The two are different in the AST, and indeedgofmt
can break working source; see http://play.golang.org/p/L9xzobGwob for an example.I'm using Ubuntu amd64. It is reproducible on my machine and in the Playground as follows:
The text was updated successfully, but these errors were encountered: