]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.typeparams] cmd/compile: remove now-unneeded check for '==' method for comparabl...
authorDan Scales <danscales@google.com>
Thu, 29 Jul 2021 20:36:36 +0000 (13:36 -0700)
committerDan Scales <danscales@google.com>
Fri, 30 Jul 2021 00:20:20 +0000 (00:20 +0000)
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 <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>

src/runtime/iface.go

index 71bd2d2f07207eec6ee4f4e6dcaadcc770322236..79a49c0dffb7d4db7505afee7f80f6f9a26559e7 100644 (file)
@@ -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)