-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/lsp/analysis/fillreturns: be defensive w.r.t. type errors
In the presence of type errors, TypeOf may return nil, and this appears to have contributed to a crash in the fillreturns analysis. I haven't been able to find or deduce a test case, but this change makes the logic more defensive. Also remove a stale pre-go1.17 test that used to trigger a panic (the one fixed here? unclear) to assert that panics were recoverable. Updates golang/go#54655 Change-Id: Ic9ca9a307eede50a2d4db6424822a155dd43e635 Reviewed-on: https://go-review.googlesource.com/c/tools/+/426019 Auto-Submit: Alan Donovan <[email protected]> Reviewed-by: Robert Findley <[email protected]> TryBot-Result: Gopher Robot <[email protected]> gopls-CI: kokoro <[email protected]> Run-TryBot: Alan Donovan <[email protected]>
- Loading branch information
Showing
2 changed files
with
10 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters