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

go/types: document that Underlying affects Named, Alias, TypeParam #65774

Open
adonovan opened this issue Feb 17, 2024 · 0 comments
Open

go/types: document that Underlying affects Named, Alias, TypeParam #65774

adonovan opened this issue Feb 17, 2024 · 0 comments
Assignees
Milestone

Comments

@adonovan
Copy link
Member

adonovan commented Feb 17, 2024

Historically the Underlying method of go/types.Type used to strip off exactly one kind of type constructor: Named. Now, it removes Named, TypeParam (go1.18), and Alias (go1.22).

We should clarify the documentation of the interface method to call out this fact, and of the three concrete methods to state their behavior explicitly, and we should direct the reader to Unalias and other more discerning destructors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants