aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2023-01-11 15:03:18 -0800
committerGopher Robot <gobot@golang.org>2023-01-17 19:55:47 +0000
commit5ce9d9fee85bbdc952b7b20e94811fa24d36f1f6 (patch)
tree08da0e1ba2b822ddc7116c42bca0669116b56b54
parent248950f1928c543c31ac2d331213ce949e1b9886 (diff)
downloadgo-5ce9d9fee85bbdc952b7b20e94811fa24d36f1f6.tar.xz
go/types: use the same interface method sorting as types2
See also CL 321231 which introduces object.less to match expected compiler behavior. Change-Id: I56fbf332a04596dc96393b71d40acf4df5d950fd Reviewed-on: https://go-review.googlesource.com/c/go/+/461677 Run-TryBot: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Robert Griesemer <gri@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@google.com>
-rw-r--r--src/go/types/typeset.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/go/types/typeset.go b/src/go/types/typeset.go
index 35fb155bfa..64b9734dcd 100644
--- a/src/go/types/typeset.go
+++ b/src/go/types/typeset.go
@@ -381,7 +381,7 @@ func assertSortedMethods(list []*Func) {
type byUniqueMethodName []*Func
func (a byUniqueMethodName) Len() int { return len(a) }
-func (a byUniqueMethodName) Less(i, j int) bool { return a[i].Id() < a[j].Id() }
+func (a byUniqueMethodName) Less(i, j int) bool { return a[i].less(&a[j].object) }
func (a byUniqueMethodName) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
// invalidTypeSet is a singleton type set to signal an invalid type set