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?
to your account
go/types internally defines an original function that returns the original object of an alias, if so, or just the incoming object, otherwise.
This is useful externally, as well, similar to types.Underlying().
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
I agree that this would be a useful package-level function. (We cannot add a method to Object because that would break compatibility with user-defined implementations.)
Adding a method to Object is OK, @alandonovan. Object has unexported methods so there are no from-scratch user-defined implementations. At most there are user-defined implementations that embed some implementation provided by the go/types package.
Ah, I forgot about that. Good point.
Decision to back out current alias implementation. See #16339. Closing.
Successfully merging a pull request may close this issue.