-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go2go: embedding doesn't seem to work? #39881
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
Labels
Comments
I am running into (possibly) the same problem (this is simplified from a more complicated function): package main
func P(type T, U)(x T, y U) struct {
T
U
} {
return struct {
T
U
}{x, y}
}
func main() {
_ = P(5, "apples")
} |
Thanks. These test cases should now be fixed on the dev.go2go branch. |
Change https://golang.org/cl/240197 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Jun 26, 2020
We were relying on calling typeString and treating that as an AST ident, with special handling for instantiated types, but that fails if there is an instantiated type within a type literal. Fixes #39881 Change-Id: I793fe359868d8d73e830aa8dc67cf52de99355a8 Reviewed-on: https://go-review.googlesource.com/c/go/+/240197 Reviewed-by: Ian Lance Taylor <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, as of commit 1b08ace
What did you do?
where err.go2 is:
It gives a different error in the playground: https://go2goplay.golang.org/p/2h7HWFVkvW2
(a couple days ago it crashed, so this is better than it was)
What did you expect to see?
I expected it to construct a type like:
Only
x
will be unnamed, so I'm not sure how this is supposed to work, which is why I was trying it.What did you see instead?
It gives confusing error messages.
The text was updated successfully, but these errors were encountered: