[tools] refactor/satisfy: fix panic on invalid types

0 views
Skip to first unread message

Hongxiang Jiang (Gerrit)

unread,
11:38 AM (5 hours ago) 11:38 AM
to Peter Weinberger, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, golang...@luci-project-accounts.iam.gserviceaccount.com, Gopher Robot, golang-co...@googlegroups.com

Hongxiang Jiang submitted the change

Change information

Commit message:
refactor/satisfy: fix panic on invalid types

If a composite literal had a type error the code used to panic
on a basic type near line 400 of find.go. The new code checks
for the invalid type, but also looks at its elements.

There are a modified marker test.
Fixes: golang/go#71538
Change-Id: Ia027e4481b79b733d311d0e05a4865b794fe9df7
Reviewed-by: Hongxiang Jiang <hxj...@golang.org>
Files:
  • M gopls/internal/test/marker/testdata/rename/bad.txt
  • M refactor/satisfy/find.go
Change size: M
Delta: 2 files changed, 59 insertions(+), 0 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: Ia027e4481b79b733d311d0e05a4865b794fe9df7
Gerrit-Change-Number: 812400
Gerrit-PatchSet: 5
Gerrit-Owner: Peter Weinberger <p...@google.com>
Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
Gerrit-Reviewer: Peter Weinberger <p...@google.com>
Gerrit-CC: Gopher Robot <go...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages