Commit 575221b
[gopls-release-branch.0.17] gopls/internal/cache/testfuncs: fix crash with *error argument
The test detection logic incorrectly assumes that named types have a
non-nil package, which is not true for Error (as we've encountered
numerous times). Add the missing nil check.
Fixes golang/go#70927
Change-Id: Ibdf483304b53ce219123e820d74acd4f9d12d710
Reviewed-on: https://go-review.googlesource.com/c/tools/+/637815
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
(cherry picked from commit dcc725c)
Reviewed-on: https://go-review.googlesource.com/c/tools/+/6377361 parent 416ad03 commit 575221b
File tree
2 files changed
+2
-1
lines changed- gopls/internal
- cache/testfuncs
- test/integration/workspace
2 files changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
| 284 | + | |
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
0 commit comments