1
0
mirror of https://github.com/golang/go synced 2024-09-29 13:24:28 -06:00

go/types, types2: clean up a few typos, and an unused const

Change-Id: I01717cc52c9728b4eaaf2c996707f59a113bff9e
Reviewed-on: https://go-review.googlesource.com/c/go/+/395434
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Robert Findley 2022-02-25 18:51:48 -05:00
parent b95d332c7e
commit b88600f926
5 changed files with 4 additions and 6 deletions

View File

@ -355,7 +355,7 @@ func typeParamsString(list []*TypeParam) string {
return b.String()
}
// IsParameterized reports whether typ contains any of the type parameters of tparams.
// isParameterized reports whether typ contains any of the type parameters of tparams.
func isParameterized(tparams []*TypeParam, typ Type) bool {
w := tpWalker{
seen: make(map[Type]bool),

View File

@ -138,7 +138,7 @@ func (t *Named) Method(i int) *Func {
})
}
// instiateMethod instantiates the i'th method for an instantiated receiver.
// instantiateMethod instantiates the i'th method for an instantiated receiver.
func (t *Named) instantiateMethod(i int) *Func {
assert(t.TypeArgs().Len() > 0) // t must be an instance

View File

@ -34,8 +34,6 @@ import (
"go/token"
)
const allowTypeLists = false
// An Error describes a type-checking error; it implements the error interface.
// A "soft" error is an error that still permits a valid interpretation of a
// package (such as "unused variable"); "hard" errors may lead to unpredictable

View File

@ -354,7 +354,7 @@ func typeParamsString(list []*TypeParam) string {
return b.String()
}
// IsParameterized reports whether typ contains any of the type parameters of tparams.
// isParameterized reports whether typ contains any of the type parameters of tparams.
func isParameterized(tparams []*TypeParam, typ Type) bool {
w := tpWalker{
seen: make(map[Type]bool),

View File

@ -140,7 +140,7 @@ func (t *Named) Method(i int) *Func {
})
}
// instiateMethod instantiates the i'th method for an instantiated receiver.
// instantiateMethod instantiates the i'th method for an instantiated receiver.
func (t *Named) instantiateMethod(i int) *Func {
assert(t.TypeArgs().Len() > 0) // t must be an instance