diff options
Diffstat (limited to 'src/go/types/lookup.go')
-rw-r--r-- | src/go/types/lookup.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/go/types/lookup.go b/src/go/types/lookup.go index 07baf2a48b..6d38db4523 100644 --- a/src/go/types/lookup.go +++ b/src/go/types/lookup.go @@ -307,8 +307,7 @@ func (check *Checker) missingMethod(V Type, T *Interface, static bool) (method, _, f := ityp.typeSet().LookupMethod(m.pkg, m.name) if f == nil { - // if m is the magic method == we're ok (interfaces are comparable) - if m.name == "==" || !static { + if !static { continue } return m, f @@ -358,10 +357,6 @@ func (check *Checker) missingMethod(V Type, T *Interface, static bool) (method, // we must have a method (not a field of matching function type) f, _ := obj.(*Func) if f == nil { - // if m is the magic method == and V is comparable, we're ok - if m.name == "==" && Comparable(V) { - continue - } return m, nil } |