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 types ignored in interface implementation #40199
Comments
Hi can you please change title? cmd/go2go... |
@mmaedel Done. |
This code passes the type-checker. Likely an issue with the translator phase. |
Test case updated to new syntax: https://go2goplay.golang.org/p/Ssd4Ws7F91G |
Just checking in - is this bug being looked into? |
We know about this bug, but it's not urgent. Note that dev.go2go is a prototype. Not everything will be supported. |
The decision here is that we don't permit embedded fields to be type parameters. The current compiler gives an error. |
This is not a generics proposal, but reporting a bug in the generics branch. First presented in golang-nuts.
What version of Go are you using (
go version
)?generics branch (from https://go2goplay.golang.org/)
Does this issue reproduce with the latest release?
No, just generics branch
What operating system and processor architecture are you using (
go env
)?N/A (in https://go2goplay.golang.org/)
What did you do?
Assigned a generic type to an interface satisfied by a struct embedded in it.
https://go2goplay.golang.org/p/fOJIhgnbOxC
What did you expect to see?
It would implement the interface, and compile.
What did you see instead?
It doesn't implement the interface, and therefore doesn't compile.
The text was updated successfully, but these errors were encountered: