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 <gobot@golang.org>
Run-TryBot: Robert Griesemer <gri@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
This commit is contained in:
Robert Griesemer 2022-09-01 16:46:23 -07:00 committed by Gopher Robot
parent 40cfafff02
commit 33c1ddd5a8
1 changed files with 2 additions and 2 deletions

View File

@ -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),
),
)