Skip to content
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: Embedded type list type checking is confusing #41783

Closed
joiky opened this issue Oct 4, 2020 · 1 comment
Closed

cmd/go2go: Embedded type list type checking is confusing #41783

joiky opened this issue Oct 4, 2020 · 1 comment

Comments

@joiky
Copy link

@joiky joiky commented Oct 4, 2020

What version of Go are you using (go version)?

$ go version

Does this issue reproduce with the latest release?

n/a

What operating system and processor architecture are you using (go env)?

  • go2go playground

What did you do?

It's puzzling

https://go2goplay.golang.org/p/kAXN5YfIUod

What did you expect to see?

  • Successful compilation
int
string
int
  • OR failed compilation

What did you see instead?

int
Unknown
Unknown
@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Oct 4, 2020

Thanks. This is discussed in the design draft at https://go.googlesource.com/proposal/+/refs/heads/master/design/go2draft-type-parameters.md#identifying-the-matched-predeclared-type .

We considered permitting switching on T, but it wasn't clear that it was what people wanted. See the discussion at https://groups.google.com/d/msg/golang-nuts/iAD0NBz3DYw/VcXSK55XAwAJ (it is mixed in with other discussion in that thread).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.