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

@jimmyfrasche jimmyfrasche commented Jun 16, 2020

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

@gopherbot gopherbot commented Jun 17, 2020

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

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Jun 17, 2020

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>
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
3 participants
You can’t perform that action at this time.