mirror of https://github.com/golang/go.git
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 <adonovan@google.com> Reviewed-by: Robert Findley <rfindley@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> Run-TryBot: Alan Donovan <adonovan@google.com> |
||
|---|---|---|
| .. | ||
| embeddirective | ||
| fillreturns | ||
| fillstruct | ||
| infertypeargs | ||
| nonewvars | ||
| noresultvalues | ||
| simplifycompositelit | ||
| simplifyrange | ||
| simplifyslice | ||
| stubmethods | ||
| undeclaredname | ||
| unusedparams | ||
| unusedvariable | ||
| useany | ||