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/gc: _ methods in interfaces causes internal compiler error #5691
Labels
Milestone
Comments
The easy fix is to not call genwrapper for _ method symbols but I wonder what the semantics should be for http://play.golang.org/p/dhbX0y1u9O gccgo gives: a.go:16:4: error: incompatible types in assignment (missing method ‘_’) i = &T{} ^ Should blank methods simply be ignored? |
gccgo complains with the same error: x.go:16:8: error: incompatible types in assignment (missing method '_') i = &T{} ^ I believe that it is legal to define as many _ methods as one wants (in interfaces and for other types), but that they are not visible. Thus, no type can ever satisfy an interface with a _ method. But the spec doesn't help much in this respect. |
This fix is here: https://golang.org/cl/10255047/ Labels changed: added compilerbug, removed priority-triage. Owner changed to @ality. Status changed to Started. |
This issue was closed by revision f316a7e. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: