]> Cypherpunks.ru repositories - gostls13.git/commitdiff
go/types, types2: clean up a few typos, and an unused const
authorRobert Findley <rfindley@google.com>
Fri, 25 Feb 2022 23:51:48 +0000 (18:51 -0500)
committerRobert Findley <rfindley@google.com>
Thu, 24 Mar 2022 21:50:14 +0000 (21:50 +0000)
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>
src/cmd/compile/internal/types2/infer.go
src/cmd/compile/internal/types2/named.go
src/go/types/api.go
src/go/types/infer.go
src/go/types/named.go

index e131077371601ed1468b9270377031e4438452c2..78fc35b72a37c445ba9d3b7c07186fa27ae528d0 100644 (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),
index 7b19aeb21f0f2a79d093a38441006ee3d62ff5fc..89d24d4e0b996d6e2ab0c66e1b4b7c7cc94db839 100644 (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
 
index f2dcd104d85eed67e8e44d90211e94d06219ed75..2cbabb0a53056684d8b3829d9773c39d9e002287 100644 (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
index 6bed55c270f46b15359001437004266db2ec074c..32ec5495ee04735a43d07582b81fd74ee9318d20 100644 (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),
index 4f855ece822451c2302069bb6e38195b5d45f360..a0b94818f5a1057053126dfce75a8253a39afe3d 100644 (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