From: Robert Findley Date: Fri, 25 Feb 2022 23:51:48 +0000 (-0500) Subject: go/types, types2: clean up a few typos, and an unused const X-Git-Tag: go1.19beta1~930 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b88600f926b6a1fb6de6e3a8cc1f0db9132bddb4;p=gostls13.git 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 Run-TryBot: Robert Findley TryBot-Result: Gopher Robot Reviewed-by: Robert Griesemer --- diff --git a/src/cmd/compile/internal/types2/infer.go b/src/cmd/compile/internal/types2/infer.go index e131077371..78fc35b72a 100644 --- a/src/cmd/compile/internal/types2/infer.go +++ b/src/cmd/compile/internal/types2/infer.go @@ -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), diff --git a/src/cmd/compile/internal/types2/named.go b/src/cmd/compile/internal/types2/named.go index 7b19aeb21f..89d24d4e0b 100644 --- a/src/cmd/compile/internal/types2/named.go +++ b/src/cmd/compile/internal/types2/named.go @@ -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 diff --git a/src/go/types/api.go b/src/go/types/api.go index f2dcd104d8..2cbabb0a53 100644 --- a/src/go/types/api.go +++ b/src/go/types/api.go @@ -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 diff --git a/src/go/types/infer.go b/src/go/types/infer.go index 6bed55c270..32ec5495ee 100644 --- a/src/go/types/infer.go +++ b/src/go/types/infer.go @@ -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), diff --git a/src/go/types/named.go b/src/go/types/named.go index 4f855ece82..a0b94818f5 100644 --- a/src/go/types/named.go +++ b/src/go/types/named.go @@ -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