aboutsummaryrefslogtreecommitdiff
path: root/src/go/types/predicates.go
diff options
context:
space:
mode:
authorRobert Findley <rfindley@google.com>2021-09-08 11:57:04 -0400
committerRobert Findley <rfindley@google.com>2021-09-08 16:59:47 +0000
commitd419f9c6124557e0bf08e00d7848e3e518ac4cbd (patch)
tree72ad20fb3bd34cf7a4a2a8a15b40f4e6689b74a0 /src/go/types/predicates.go
parent12eb7331b9e220d73ecfba0281e60cf0f5285e18 (diff)
downloadgo-d419f9c6124557e0bf08e00d7848e3e518ac4cbd.tar.gz
go-d419f9c6124557e0bf08e00d7848e3e518ac4cbd.zip
go/types: spell out 'Type' in type parameter APIs
As discussed on the go/types proposal (#47916), we should spell out the word 'Type', rather than using 'T'. Change-Id: I5f51255eedc07fea61f909b7ecb3093a7fab765e Reviewed-on: https://go-review.googlesource.com/c/go/+/348376 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/go/types/predicates.go')
-rw-r--r--src/go/types/predicates.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/go/types/predicates.go b/src/go/types/predicates.go
index d4055bb0cc..73d240241e 100644
--- a/src/go/types/predicates.go
+++ b/src/go/types/predicates.go
@@ -21,7 +21,7 @@ func isNamed(typ Type) bool {
func isGeneric(typ Type) bool {
// A parameterized type is only instantiated if it doesn't have an instantiation already.
named, _ := typ.(*Named)
- return named != nil && named.obj != nil && named.targs == nil && named.TParams() != nil
+ return named != nil && named.obj != nil && named.targs == nil && named.TypeParams() != nil
}
func is(typ Type, what BasicInfo) bool {
@@ -220,7 +220,7 @@ func identical(x, y Type, cmpTags bool, p *ifacePair) bool {
// parameter names.
if y, ok := y.(*Signature); ok {
return x.variadic == y.variadic &&
- identicalTParams(x.TParams().list(), y.TParams().list(), cmpTags, p) &&
+ identicalTParams(x.TypeParams().list(), y.TypeParams().list(), cmpTags, p) &&
identical(x.params, y.params, cmpTags, p) &&
identical(x.results, y.results, cmpTags, p)
}
@@ -305,8 +305,8 @@ func identical(x, y Type, cmpTags bool, p *ifacePair) bool {
x.expand(nil)
y.expand(nil)
- xargs := x.TArgs().list()
- yargs := y.TArgs().list()
+ xargs := x.TypeArgs().list()
+ yargs := y.TypeArgs().list()
if len(xargs) != len(yargs) {
return false