aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/typexpr.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-08-24 20:20:07 -0700
committerRobert Griesemer <gri@golang.org>2021-08-25 23:43:58 +0000
commit0ac64f6d700b56fa793d9304bec621cf4dde6fd6 (patch)
tree07516332a275aec01d36ee7201fb23007c6d5e9f /src/cmd/compile/internal/types2/typexpr.go
parent4068fb6c2162b38db7912903ff12bafe9f5ca9bb (diff)
downloadgo-0ac64f6d700b56fa793d9304bec621cf4dde6fd6.tar.gz
go-0ac64f6d700b56fa793d9304bec621cf4dde6fd6.zip
cmd/compile/internal/types2: rename IsMethodSet to IsConstraint (cleanup)
Invert the boolean result to match the new name. Change-Id: Ide6c649ed8ac3a5d263640309960e61a005c886e Reviewed-on: https://go-review.googlesource.com/c/go/+/344872 Trust: Robert Griesemer <gri@golang.org> Trust: Dan Scales <danscales@google.com> Reviewed-by: Dan Scales <danscales@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/typexpr.go')
-rw-r--r--src/cmd/compile/internal/types2/typexpr.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/types2/typexpr.go b/src/cmd/compile/internal/types2/typexpr.go
index f3e415e4c7..6938648bbc 100644
--- a/src/cmd/compile/internal/types2/typexpr.go
+++ b/src/cmd/compile/internal/types2/typexpr.go
@@ -151,7 +151,7 @@ func (check *Checker) ordinaryType(pos syntax.Pos, typ Type) {
check.later(func() {
if t := asInterface(typ); t != nil {
tset := computeInterfaceTypeSet(check, pos, t) // TODO(gri) is this the correct position?
- if !tset.IsMethodSet() {
+ if tset.IsConstraint() {
if tset.comparable {
check.softErrorf(pos, "interface is (or embeds) comparable")
} else {