New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go2go: go2go playground: error with go fmt (generics) #43470
Comments
It does work when I run it from the link above. |
The gofmt program does seem to work on the dev.go2go branch, so this may indicate a bug in the way we update the go2go playground. CC @griesemer |
The |
Change https://golang.org/cl/283134 mentions this issue: |
In order to support generic code, cmd/gofmt was updated to parse type parameters. However, the playground uses go/format, which was not updated accordingly. Fix this. A minor change is also made in go/printer to avoid a data race exposed by this change. Fixes #43470 Change-Id: I8a3ac5e3cbc8767e0ca1675130dd27634cb5018f Reviewed-on: https://go-review.googlesource.com/c/go/+/283134 Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Trust: Robert Findley <rfindley@google.com>
This fix is now deployed. |
What version of Go are you using (
go version
)?https://go2goplay.golang.org/
fmt.Println(runtime.Version())
reportsdevel +abe4d3dce1 Tue Dec 8 17:59:47 2020 +0000
Does this issue reproduce with the latest release?
N/A
What operating system and processor architecture are you using (
go env
)?N/A
What did you do?
https://go2goplay.golang.org/p/IUL1QDrtOwW
Click on "Format". (Note: this program runs happily)
What did you expect to see?
Program to be re-formatted
What did you see instead?
The text was updated successfully, but these errors were encountered: