]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: report better error messages for slice expressions
authorRobert Griesemer <gri@golang.org>
Fri, 7 Mar 2025 19:26:38 +0000 (11:26 -0800)
committerGopher Robot <gobot@golang.org>
Tue, 11 Mar 2025 12:44:15 +0000 (05:44 -0700)
commitae4c13afc51d81e9aefdfb101e895bc7318c05cd
tree905701265795491c82c9fec1ae056f9724eb9fef
parente5d3ece35d34a0d00ad8131d4dd7af7951aada68
go/types, types2: report better error messages for slice expressions

Explicitly compute the common underlying type and while doing
so report better slice-expression relevant error messages.
Streamline message format for index and slice errors.

This removes the last uses of the coreString and match functions.
Delete them.

Change-Id: I4b50dda1ef7e2ab5e296021458f7f0b6f6e229cd
Reviewed-on: https://go-review.googlesource.com/c/go/+/655935
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/index.go
src/cmd/compile/internal/types2/under.go
src/go/types/index.go
src/go/types/under.go
src/internal/types/testdata/check/typeparams.go
test/complit1.go
test/fixedbugs/bug022.go