]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/go: fix missing case checking for empty slice
authorMichael Matloob <matloob@golang.org>
Mon, 7 Aug 2023 21:03:43 +0000 (17:03 -0400)
committerMichael Matloob <matloob@golang.org>
Wed, 9 Aug 2023 17:34:46 +0000 (17:34 +0000)
commit58447d757c233f2a9c3c5a73e2d96a6885f2759a
tree60a84af81e0d91c44d8307874a780776f637ddd1
parent5b2ddfadb2e218e325c91d1024ffbe87c1f38d19
cmd/go: fix missing case checking for empty slice

When we were comparing the first element of import stacks when sorting
depserrors we checked if the first stack was non empty, but not the
second one. Do the check for both stacks.

Fixes #61816
For #59905

Change-Id: Id5c11c2b1104eec93196a08c53372ee2ba97c701
Reviewed-on: https://go-review.googlesource.com/c/go/+/516739
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/list/list.go
src/cmd/go/testdata/script/list_issue_59905.txt