From ecc8650398d6f5f78843a162c6579d2e45cbf7fe Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Wed, 22 Nov 2017 13:12:42 -0800 Subject: [PATCH] go/types: fix type in Interface.Complete method This doesn't appear to have caused problems (because we don't depend on the sort order, it seems) but it's clearly incorrect. Change-Id: Ib6eb0128a3c17997c7907a618f9ce102b32aaa98 Reviewed-on: https://go-review.googlesource.com/79497 Reviewed-by: Matthew Dempsky Run-TryBot: Matthew Dempsky TryBot-Result: Gobot Gobot --- src/go/types/type.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/go/types/type.go b/src/go/types/type.go index f4cf61d8e67..4c681a79c4d 100644 --- a/src/go/types/type.go +++ b/src/go/types/type.go @@ -262,7 +262,7 @@ func NewInterface(methods []*Func, embeddeds []*Named) *Interface { } sort.Sort(byUniqueMethodName(methods)) - if embeddeds == nil { + if embeddeds != nil { sort.Sort(byUniqueTypeName(embeddeds)) }