aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/typexpr.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-01-22 16:49:21 -0800
committerRobert Griesemer <gri@golang.org>2021-01-23 01:40:32 +0000
commit5347241b5e64eb9a7b0ef97b12d899f32a05c2b8 (patch)
tree33fd1b604ccf67f5409fad59327e4bc29a432cd2 /src/cmd/compile/internal/types2/typexpr.go
parent2b95c28b18872b2d61ac9e9b32f63c76b619e86b (diff)
downloadgo-5347241b5e64eb9a7b0ef97b12d899f32a05c2b8.tar.gz
go-5347241b5e64eb9a7b0ef97b12d899f32a05c2b8.zip
[dev.typeparams] cmd/compile/internal/types2: use same sort criteria for methods as compiler
Note: This invalidates the implementation of MethodSet further (it also has not been updated to accomodate for type parameters). But types2 doesn't make use of it. We should remove it. Change-Id: Ia2601bdd59b3f3ee0b72bc2512153c42bf5053b5 Reviewed-on: https://go-review.googlesource.com/c/go/+/285994 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/typexpr.go')
-rw-r--r--src/cmd/compile/internal/types2/typexpr.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/types2/typexpr.go b/src/cmd/compile/internal/types2/typexpr.go
index d0bf229be9..9ab84b594b 100644
--- a/src/cmd/compile/internal/types2/typexpr.go
+++ b/src/cmd/compile/internal/types2/typexpr.go
@@ -1064,7 +1064,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]) }
func (a byUniqueMethodName) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (check *Checker) tag(t *syntax.BasicLit) string {