-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/go/types: API adjustments, cleanup #6634
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
Labels
Milestone
Comments
Owner changed to @griesemer. Status changed to Accepted. |
Issue #6668 has been merged into this issue. |
One addition: - export Comparable and a suggestion: - the "static bool" parameter to Implements is a confusing. Move the static=false case into its own function named, e.g., Assertible or CanAssert or ValidTypeAssertion On a related note, the doc for MethodSet.MissingMethod needs to be fixed: The last bit "...where x is of interface type typ)" should read "...where x is of interface type V)" |
I wasn't sure if my previous suggestion made sense or not so I went ahead and implemented it: https://golang.org/cl/58540044/ OK if I mail this change? |
Comment 13 by matt@stackoverflow.com: @gordon Legitimate argument, they really are small helpers. I’d be tempted to have a single helper along the lines of would be handy: func HasBasicInfo(typ Type, b BasicInfo) bool { t, ok := typ.Underlying().(*Basic) return ok && t.info&b!= 0 } (Not a great name but you get the idea.) |
Several (most?) of the suggestions have been implemented; it's too late for the remaining ones. The API may be extended but otherwise is now frozen. |
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: