[go] go/types, types2: reorder channel sends to extract value target type

0 views
Skip to first unread message

Mark Freeman (Gerrit)

unread,
Jul 16, 2026, 3:53:11 PM (yesterday) Jul 16
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, golang...@luci-project-accounts.iam.gserviceaccount.com, Robert Griesemer, golang-co...@googlegroups.com

Mark Freeman submitted the change with unreviewed changes

Unreviewed changes

2 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: src/go/types/stmt.go
Insertions: 1, Deletions: 0.

The diff is too large to show. Please review the diff.
```
```
The name of the file: src/cmd/compile/internal/types2/stmt.go
Insertions: 1, Deletions: 0.

The diff is too large to show. Please review the diff.
```

Change information

Commit message:
go/types, types2: reorder channel sends to extract value target type

For channel sends, we currently check the sent value before inspecting
the channel element type. If we check the channel element type first,
we can extract a target type for the value. This change reorders
processing to do so.

This is a necessary prerequisite for composite literal type inference.

For #12854
Change-Id: I19b1ef73a2f82b3c45cd3f4a3f0dc32cd795e7ac
Reviewed-by: Robert Griesemer <g...@google.com>
Auto-Submit: Mark Freeman <markf...@google.com>
Files:
  • M src/cmd/compile/internal/types2/stmt.go
  • M src/go/types/stmt.go
Change size: S
Delta: 2 files changed, 22 insertions(+), 12 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I19b1ef73a2f82b3c45cd3f4a3f0dc32cd795e7ac
Gerrit-Change-Number: 793980
Gerrit-PatchSet: 10
Gerrit-Owner: Mark Freeman <markf...@google.com>
Gerrit-Reviewer: Mark Freeman <markf...@google.com>
Gerrit-Reviewer: Robert Griesemer <g...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages