aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/type.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-07-28 16:58:57 -0700
committerRobert Griesemer <gri@golang.org>2021-07-29 21:05:49 +0000
commit5ecbd811b54f478244b7e54a621f32b5b8e3ea95 (patch)
treee6956a23dd26c301bf7660634118b865d760eaec /src/cmd/compile/internal/types2/type.go
parent46cc68638143770206e0894add7021990a9bec52 (diff)
downloadgo-5ecbd811b54f478244b7e54a621f32b5b8e3ea95.tar.gz
go-5ecbd811b54f478244b7e54a621f32b5b8e3ea95.zip
[dev.typeparams] cmd/compile/internal/types2: (TypeParam) SetBound -> SetConstraint
This matches the accessor named Constraint, and any documentation we have so far. Use iface instead of Bound internally to types2; keep Bound because of two external uses but mark it as deprecated. Adjust clients. Change-Id: Id1a2c2f28259a16082e875eee0534d46cf157336 Reviewed-on: https://go-review.googlesource.com/c/go/+/338196 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/type.go')
-rw-r--r--src/cmd/compile/internal/types2/type.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/types2/type.go b/src/cmd/compile/internal/types2/type.go
index 80054372bc..a943926189 100644
--- a/src/cmd/compile/internal/types2/type.go
+++ b/src/cmd/compile/internal/types2/type.go
@@ -56,7 +56,7 @@ func optype(typ Type) Type {
// for a type parameter list of the form:
// (type T interface { type T }).
// See also issue #39680.
- if a := t.Bound().typeSet().types; a != nil {
+ if a := t.iface().typeSet().types; a != nil {
// If we have a union with a single entry, ignore
// any tilde because under(~t) == under(t).
if u, _ := a.(*Union); u != nil && u.NumTerms() == 1 {