mirror of
https://github.com/golang/go
synced 2024-11-23 17:50:06 -07:00
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>
This commit is contained in:
parent
248950f192
commit
5ce9d9fee8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user