Skip to content

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

@adonovan

Description

@adonovan

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.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions