]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: call error handler for each sub-error as needed
authorRobert Griesemer <gri@golang.org>
Fri, 23 Feb 2024 20:43:51 +0000 (12:43 -0800)
committerGopher Robot <gobot@golang.org>
Tue, 27 Feb 2024 23:58:35 +0000 (23:58 +0000)
commit96e9838f39d8da2cd249f5ee62869239cbb1e9e7
tree4b14d8379f6ad5a97ea5f1e49168db4814224a24
parent960654be0c4ad7918376e2e1d47491c9bc7520e0
go/types, types2: call error handler for each sub-error as needed

Factor out calling or typechecker error handler from error_.report.
In error_.report, decide if the typechecker error handler needs to
be called once or multiple times.

This change enables the use of sub-errors for types2 and go/types,
with the error handler taking care of deciding how many "separate"
errors are reported via the API.

Use new error reporting in go/types mono and initorder computation;
with the above adjustments, these changes should now pass gopls tests.

Also: adjust some format strings to avoid vet errors.

Change-Id: If05a7044399b4783c596c69a8158619f83c21c70
Reviewed-on: https://go-review.googlesource.com/c/go/+/566537
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/decl.go
src/cmd/compile/internal/types2/errors.go
src/cmd/compile/internal/types2/infer.go
src/go/types/decl.go
src/go/types/errors.go
src/go/types/expr.go
src/go/types/infer.go
src/go/types/initorder.go
src/go/types/mono.go