aboutsummaryrefslogtreecommitdiff
path: root/test/cannotassign.go
AgeCommit message (Collapse)Author
2020-12-01[dev.typeparams] test: add scaffolding to run.go to check compiler with -G flagRobert Griesemer
Added a new flag -G to run. Setting -G (as in: go run run.go -G) will run tests marked with "errorcheck" (and no other flags) also with the compiler using the new typechecker. Many tests don't pass yet (due to discrepancies in error messages). The top-level tests in the test directory which don't pass yet have been explicitly excluded, permitting to see the current status. Future CLs will bring error messages in sync and eventually all tests should pass. Change-Id: I7caf5eff413e173f68d092af4bbe458434718d74 Reviewed-on: https://go-review.googlesource.com/c/go/+/274313 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2020-09-16cmd/compile: be more specific in cannot assign errorsAlberto Donizetti
"cannot assign to" compiler errors are very laconic: they never explain why the lhs cannot be assigned to (with one exception, when assigning to a struct field in a map). This change makes them a little more specific, in two more cases: when assigning to a string, or to a const; by giving a very brief reason why the lhs cannot be assigned to. Change-Id: I244cca7fc3c3814e00e0ccadeec62f747c293979 Reviewed-on: https://go-review.googlesource.com/c/go/+/255199 Trust: Alberto Donizetti <alb.donizetti@gmail.com> Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>