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: format in playground creates invalid code #41195
Comments
/cc @griesemer @andybons |
Change https://golang.org/cl/252879 mentions this issue: |
I assumed this was fixed with https://go-review.googlesource.com/c/go/+/251278 but I guess not. Trying once more. The real fix is to remove all the various parsing and printing modes again, now that we have presumably settled on the type parameter list syntax. |
…a few more places Now that we have mostly settled on the type parameter list syntax we should probably remove the various modes of parsing and printing. For now just set the UseBrackets flag explicitly when printing. Updates #41195. Change-Id: I56b06b4f930908579a38a140e8221618c8e2fa17 Reviewed-on: https://go-review.googlesource.com/c/go/+/252879 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This is now also fixed in the playground after a recent update. |
The Format button in https://go2goplay.golang.org/ adds a
type
prefix to all the type parameters, which it then rejects as a syntax error.To reproduce, just go to https://go2goplay.golang.org/ and click Format, then Run.
The text was updated successfully, but these errors were encountered: