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
gccgo: Wrong computed promoted method set #4365
Labels
Comments
Based on the current spec, I believe this is a bug in gccgo. The spec says that the method set of a struct includes all promoted methods, not all methods. A promoted method is a method M such that v.M denotes that method. In this case v.M denotes the embedded field, not the method. So M should not be in the method set, and the assignment should fail. Of course we could decide that the spec is wrong, but I think the spec is plausible, and it follows that gccgo is in error. It would be great if you could add this test to the testsuite. Labels changed: added priority-later, gccgo, removed priority-triage. |
I updated the summary to better match the problem based on rsc and gri comments. How should I add this test to the testsuite? Also, if I add it it will fail and according to the contribution guidelines I can't add a patch that introduces new errors, therefore I'd need to fix the problem first. And I'm not sure it's worth spending time for me going through the gccgo code at this time. |
Fixed on tip. https://golang.org/cl/147280043/ Status changed to Fixed. |
CL https://golang.org/cl/151410043 mentions this issue. |
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: