]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: remove most remaining references to coreType in builtin.go
authorRobert Griesemer <gri@golang.org>
Wed, 26 Feb 2025 23:14:30 +0000 (15:14 -0800)
committerGopher Robot <gobot@golang.org>
Mon, 3 Mar 2025 19:26:31 +0000 (11:26 -0800)
commit26ba61dfad46f24a2a3138a40f738ecd22536edf
tree634c0852fcca811c4345d5aa7b274d15e2d69e9b
parent19d0b3e81f4a072615f92fd6821c8ed2cee27c9f
go/types, types2: remove most remaining references to coreType in builtin.go

For now, use commonUnder (formerly called sharedUnder) and update
error messages and comments. We can provide better error messages
in individual cases eventually.

Kepp using coreType for make built-in for now because it must accept
different channel types with non-conflicting directions and identical
element types. Added extra test cases.

While at it, rename sharedUnder, sharedUnderOrChan to commonUnder
and commonUnderOrChan, respectively (per suggestion from rfindley).

For #70128.

Change-Id: I11f3d5ce858746574f4302271d8cb763c2cdcf98
Reviewed-on: https://go-review.googlesource.com/c/go/+/653139
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/builtins.go
src/cmd/compile/internal/types2/call.go
src/cmd/compile/internal/types2/lookup.go
src/cmd/compile/internal/types2/stmt.go
src/cmd/compile/internal/types2/under.go
src/go/types/builtins.go
src/go/types/call.go
src/go/types/lookup.go
src/go/types/stmt.go
src/go/types/under.go
src/internal/types/testdata/check/builtins1.go