]> Cypherpunks repositories - gostls13.git/commit
go/types: improve error messages for unexpected ListExprs
authorRob Findley <rfindley@google.com>
Wed, 28 Apr 2021 20:32:38 +0000 (16:32 -0400)
committerRobert Findley <rfindley@google.com>
Thu, 29 Apr 2021 13:24:00 +0000 (13:24 +0000)
commiteb3fe28d7079692a1545887a2c609b325ec7f087
treed0a7ed853dbefe733c251b86cf2ea662e6926b6f
parentc8a92d454c74d89f172f6d534395a0553eff8f20
go/types: improve error messages for unexpected ListExprs

This CL is a mix of CL 312149 and CL 314409, adding the
Checker.singleIndex method to provide better error messages when an
unexpected ListExpr is encountered.

Change-Id: I45d6de9b4dfc299dc2d356ca14d05c9191de818d
Reviewed-on: https://go-review.googlesource.com/c/go/+/314869
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/types/expr.go
src/go/types/index.go
src/go/types/testdata/fixedbugs/issue45635.go2