]> Cypherpunks repositories - gostls13.git/commit
go/types: remove Checker.useLHS - not needed
authorRobert Griesemer <gri@golang.org>
Mon, 20 Mar 2023 20:32:04 +0000 (13:32 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 21 Mar 2023 21:47:10 +0000 (21:47 +0000)
commitcbcef91a1054dedaa97ce07874281ac842838ac8
tree552b9d91c76abcbded89bf26d4eb792af317cf48
parent70d836debbaf660d41604761a839e28fa349a8f9
go/types: remove Checker.useLHS - not needed

We can just use Checker.use, as long as we take care of blank (_)
identifiers that may appear of the LHS of assignments. It's ok to
"use" non-blank variables in case of an error, even on the LHS.

This makes this code match the types2 implementation.

Change-Id: Ied9b9802ecb63912631bbde1dc6993ae855a691b
Reviewed-on: https://go-review.googlesource.com/c/go/+/477895
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
src/go/types/assignments.go
src/go/types/call.go