gopls/internal/lsp/source/methodsets: comparable also has no package

Fix a crash where "error" is assumed to be the only named type with no
package.

Fixes golang/go#60544

Change-Id: I911296936f93429c780761979aeba38936b14428
Reviewed-on: https://go-review.googlesource.com/c/tools/+/499196
Reviewed-by: Alan Donovan <adonovan@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
diff --git a/gopls/internal/lsp/source/methodsets/methodsets.go b/gopls/internal/lsp/source/methodsets/methodsets.go
index dac369b..56b8ce3 100644
--- a/gopls/internal/lsp/source/methodsets/methodsets.go
+++ b/gopls/internal/lsp/source/methodsets/methodsets.go
@@ -351,8 +351,8 @@
 			if tname.Pkg() != nil {
 				buf.WriteString(strconv.Quote(tname.Pkg().Path()))
 				buf.WriteByte('.')
-			} else if tname.Name() != "error" {
-				panic(tname) // error is the only named type with no package
+			} else if tname.Name() != "error" && tname.Name() != "comparable" {
+				panic(tname) // error and comparable the only named types with no package
 			}
 			buf.WriteString(tname.Name())