[go] go/types, types2: pass in some targets for composite literal types

0 views
Skip to first unread message

Gopher Robot (Gerrit)

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

Gopher Robot submitted the change

Unreviewed changes

4 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Change information

Commit message:
go/types, types2: pass in some targets for composite literal types

This change handles the more straightforward targets for composite
literal type inference; they are typically identical to the targets
passed for generic function values.

A variety of test cases are added. Those which are awaiting
implementation are commented out for now.

For #12854
Change-Id: I776e160dd7bce0768589a552c4e7913b1c70220f
Reviewed-by: Robert Griesemer <g...@google.com>
Auto-Submit: Mark Freeman <markf...@google.com>
Files:
  • M src/cmd/compile/internal/types2/assignments.go
  • M src/cmd/compile/internal/types2/call.go
  • M src/cmd/compile/internal/types2/decl.go
  • M src/cmd/compile/internal/types2/index.go
  • M src/cmd/compile/internal/types2/literals.go
  • M src/cmd/compile/internal/types2/stmt.go
  • M src/go/types/assignments.go
  • M src/go/types/call.go
  • M src/go/types/decl.go
  • M src/go/types/index.go
  • M src/go/types/literals.go
  • M src/go/types/stmt.go
  • R src/internal/types/testdata/check/compliterals0.go
  • A src/internal/types/testdata/check/compliterals1.go
  • A src/internal/types/testdata/check/compliterals2.go
  • A src/internal/types/testdata/check/compliterals3.go
Change size: L
Delta: 16 files changed, 278 insertions(+), 20 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: I776e160dd7bce0768589a552c4e7913b1c70220f
Gerrit-Change-Number: 794088
Gerrit-PatchSet: 11
Gerrit-Owner: Mark Freeman <markf...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
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