]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: consistently set x.mode in Checker.assignment
authorRobert Griesemer <gri@golang.org>
Tue, 18 Apr 2023 17:20:15 +0000 (10:20 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 18 Apr 2023 23:15:05 +0000 (23:15 +0000)
commit6a5f35047f8c69301bc05ee4359bb20bd71dcad9
tree711b26078574aca43c7310593fc6bd13a08c8cfe
parenta41a29ad19c25c3475a65b7265fcad870d954c2a
go/types, types2: consistently set x.mode in Checker.assignment

Per the doc string, Checker.assignment must set x.mode to invalid
in case of failure.

(It may be simpler to return a bool, but the operand x may be tested
by callers several stack frames above.)

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