From: Dan Scales Date: Thu, 29 Jul 2021 20:36:36 +0000 (-0700) Subject: [dev.typeparams] cmd/compile: remove now-unneeded check for '==' method for comparabl... X-Git-Tag: go1.18beta1~1818^2^2~75 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=27283d208f;p=gostls13.git [dev.typeparams] cmd/compile: remove now-unneeded check for '==' method for comparable type Comparable type no longer has a special method '=='. Change-Id: I152f324d83343a66300050479181a6607fb7ca26 Reviewed-on: https://go-review.googlesource.com/c/go/+/338409 Run-TryBot: Dan Scales TryBot-Result: Go Bot Reviewed-by: Keith Randall Trust: Dan Scales --- diff --git a/src/runtime/iface.go b/src/runtime/iface.go index 71bd2d2f07..79a49c0dff 100644 --- a/src/runtime/iface.go +++ b/src/runtime/iface.go @@ -214,16 +214,6 @@ imethods: if ipkg == "" { ipkg = inter.pkgpath.name() } - if iname == "==" { - // Don't need '==' method right now (from comparable), - // just fill in with a random pointer for now. - if k == 0 { - fun0 = unsafe.Pointer(m) - } else { - methods[k] = unsafe.Pointer(m) - } - continue imethods - } for ; j < nt; j++ { t := &xmhdr[j] tname := typ.nameOff(t.name)