]> Cypherpunks.ru repositories - gostls13.git/commit
go/types, types2: don't report assignment mismatch errors if there are other errors
authorRobert Griesemer <gri@golang.org>
Thu, 23 Mar 2023 03:57:52 +0000 (20:57 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 28 Mar 2023 22:22:08 +0000 (22:22 +0000)
commit91a40f43b629ac9237967f3faf0733de268ea652
tree73e48564c0dee66a32258ce1d62615686a563904
parenta6f564c8e97ddf9c523d363d4cd87db613f90029
go/types, types2: don't report assignment mismatch errors if there are other errors

Change the Checker.use/useLHS functions to report if all "used"
expressions evaluated without error. Use that information to
control whether to report an assignment mismatch error or not.
This will reduce the number of errors reported per assignment,
where the assignment mismatch is only one of the errors.

Change-Id: Ia0fc3203253b002e4e1d5759d8d5644999af6884
Reviewed-on: https://go-review.googlesource.com/c/go/+/478756
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/assignments.go
src/cmd/compile/internal/types2/call.go
src/go/types/assignments.go
src/go/types/call.go
test/fixedbugs/issue19012.go