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
Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem. Thanks.
What steps will reproduce the problem?
1. gofmt this program:
package main
type T []int
func main() {
for _ = range []T{T{42}} {
}
}
What is the expected output? What do you see instead?
.../TestGo.go:6:21: expected '}', found '{'
.../TestGo.go:7:2: expected declaration, found '}'
.../TestGo.go:8:1: expected declaration, found '}'
What is your $GOOS? $GOARCH?
linux 386
Which revision are you using? (hg identify)
e7d0863b48db tip
Please provide any additional information below.
gofmt does work when the slice literal is in round brackets
("([]T{T{42}})"). It strips the outer brackets, meaning the next time it
won't work.
Attachments:
The text was updated successfully, but these errors were encountered: