go/analysis/passes/errorsas: update testdata for new warning

A new testdata file was added since CL 339889 was authored.
Update it in the same way for the new warning.

Updates golang/go#47528.
Fixes golang/go#52613.

Change-Id: I17d06c602eeabcc4ddc8514d5e444acdb714ab94
Reviewed-on: https://go-review.googlesource.com/c/tools/+/403034
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Tim King <taking@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Dmitri Shuralyov 2022-04-28 20:12:56 -04:00 committed by Gopher Robot
parent 115b454b56
commit 6fff1af1a8
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ func _[E error](e E) {
errors.As(nil, &e)
errors.As(nil, &m) // *T where T implemements error
errors.As(nil, &tw.t) // *T where T implements error
errors.As(nil, perr[error]()) // *error, via a call
errors.As(nil, perr[error]()) // want `second argument to errors.As should not be \*error`
errors.As(nil, e) // want `second argument to errors.As must be a non-nil pointer to either a type that implements error, or to any interface type`
errors.As(nil, m) // want `second argument to errors.As must be a non-nil pointer to either a type that implements error, or to any interface type`