You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the types.Alias work, there was a recurring need (7 times in x/tools; @findleyr is adding an eighth) for this interface:
package types // import "go/types"// HasTypeName abstracts the three kinds of types that have declared names:// aliases ([*Alias]), defined types ([*Named]), and type parameters ([*TypeParam]).//// Note that the Go spec considers built-in types such as string and int to// be defined types, but this package represents them as [*Basic],// since they do not have a declaration or [TypeName].typeHasTypeNameinterface {
Obj() *TypeName
}
Of course users can easily define it for themselves, but adding it to go/types provides a good place to hang additional documentation.
During the types.Alias work, there was a recurring need (7 times in x/tools; @findleyr is adding an eighth) for this interface:
Of course users can easily define it for themselves, but adding it to
go/types
provides a good place to hang additional documentation.Related:
@findleyr @griesemer
The text was updated successfully, but these errors were encountered: