From 6fff1af1a8382fba300d7dafce48aa0bfae578d8 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Thu, 28 Apr 2022 20:12:56 -0400 Subject: [PATCH] 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 TryBot-Result: Gopher Robot Reviewed-by: Dmitri Shuralyov Reviewed-by: Tim King Run-TryBot: Dmitri Shuralyov gopls-CI: kokoro --- .../passes/errorsas/testdata/src/typeparams/typeparams.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/analysis/passes/errorsas/testdata/src/typeparams/typeparams.go b/go/analysis/passes/errorsas/testdata/src/typeparams/typeparams.go index 5b9ec457cf..4f7ae8491a 100644 --- a/go/analysis/passes/errorsas/testdata/src/typeparams/typeparams.go +++ b/go/analysis/passes/errorsas/testdata/src/typeparams/typeparams.go @@ -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`