aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/predicates.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-07-28 15:29:19 -0700
committerRobert Griesemer <gri@golang.org>2021-07-29 21:05:45 +0000
commit27552e9172c5a9f7bbd8428c6e30eac14bb5e0b0 (patch)
tree725803dfd6ba089389abe0a83f9c83e0eeff6f6e /src/cmd/compile/internal/types2/predicates.go
parentaf903261e7e6af8ce932433cf87a60381781bfb9 (diff)
downloadgo-27552e9172c5a9f7bbd8428c6e30eac14bb5e0b0.tar.gz
go-27552e9172c5a9f7bbd8428c6e30eac14bb5e0b0.zip
[dev.typeparams] cmd/compile: set type parameter indices when they are bound
This is a port of CL 336249 with adjustments due to slightly different handling of type parameter declaration in types2. The CL also contains adjustments to the compiler front-end. With this change it is not necessary to export type parameter indices. Filed issue #47451 so we don't forget. Change-Id: I2834f7be313fcb4763dff2a9058f1983ee6a81b3 Reviewed-on: https://go-review.googlesource.com/c/go/+/338192 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/predicates.go')
-rw-r--r--src/cmd/compile/internal/types2/predicates.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/types2/predicates.go b/src/cmd/compile/internal/types2/predicates.go
index cd9fa3f564..f3aeafcbb7 100644
--- a/src/cmd/compile/internal/types2/predicates.go
+++ b/src/cmd/compile/internal/types2/predicates.go
@@ -227,7 +227,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, y.tparams, cmpTags, p) &&
+ identicalTParams(x.TParams().list(), y.TParams().list(), cmpTags, p) &&
identical(x.params, y.params, cmpTags, p) &&
identical(x.results, y.results, cmpTags, p)
}