From 33c1ddd5a887633d5bd0ca5c8f0f012875e5d5d3 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 1 Sep 2022 16:46:23 -0700 Subject: [PATCH] tools/gopls/internal/regtest/diagnostics: handle new error message Pending CL 426477 changes go/types error messages containing the phrase: type parameters require to: type parameter requires Adjust diagnostics test accordingly (note that regular expressions are currently not supported). For golang/go#54511. Change-Id: I561cb940a41cb6cc949c44e0d4b8f009336a46cd Reviewed-on: https://go-review.googlesource.com/c/tools/+/427736 TryBot-Result: Gopher Robot Run-TryBot: Robert Griesemer gopls-CI: kokoro Auto-Submit: Robert Griesemer Reviewed-by: Robert Findley Reviewed-by: Robert Griesemer --- gopls/internal/regtest/diagnostics/diagnostics_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gopls/internal/regtest/diagnostics/diagnostics_test.go b/gopls/internal/regtest/diagnostics/diagnostics_test.go index 4d34b0aa20..4b38bf0e57 100644 --- a/gopls/internal/regtest/diagnostics/diagnostics_test.go +++ b/gopls/internal/regtest/diagnostics/diagnostics_test.go @@ -2109,7 +2109,7 @@ func F[T any](_ T) { var d protocol.PublishDiagnosticsParams env.Await( OnceMet( - env.DiagnosticAtRegexpWithMessage("main.go", `T any`, "type parameters require"), + env.DiagnosticAtRegexpWithMessage("main.go", `T any`, "type parameter"), ReadDiagnostics("main.go", &d), ), ) @@ -2143,7 +2143,7 @@ func F[T any](_ T) { var d protocol.PublishDiagnosticsParams env.Await( OnceMet( - env.DiagnosticAtRegexpWithMessage("main.go", `T any`, "type parameters require"), + env.DiagnosticAtRegexpWithMessage("main.go", `T any`, "type parameter"), ReadDiagnostics("main.go", &d), ), )