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: confusing error message when embedding interface with type list #39626

Closed
jimmyfrasche opened this issue Jun 16, 2020 · 2 comments
Closed

Comments

@jimmyfrasche
Copy link
Member

https://go2goplay.golang.org/p/UjyJ-OVe8Vk

type Embed interface { type int }
type x interface { Embed }

results in undefined: Embed instead of allowing the interface to be embedded

Discovered trying to see what the error message was for https://go2goplay.golang.org/p/j1suJ2sWWT1

@gopherbot
Copy link

Change https://golang.org/cl/238360 mentions this issue: [dev.go2go] go/go2go: check for embedded interface with type list

@ianlancetaylor
Copy link
Contributor

Thanks. This should be fixed now.

gopherbot pushed a commit that referenced this issue Jun 17, 2020
Add an accessor to go/types: HasTypeList for an interface type.

Fixes #39626

Change-Id: I880eabbe6660739cd7febc1df89eaa7f9262c8c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/238360
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@golang golang locked and limited conversation to collaborators Jun 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants