aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder/unified.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@google.com>2026-03-16 14:01:37 -0700
committerGopher Robot <gobot@golang.org>2026-03-19 17:16:38 -0700
commit30bfe53dd7485e211247a6d5c2f29a6aea0719a9 (patch)
treeb278c0e91629d25820f59316cefb8ba254c4a64e /src/cmd/compile/internal/noder/unified.go
parent9ec1d8f335bb76a07e9724fb332a4c2572d0fc3b (diff)
downloadgo-30bfe53dd7485e211247a6d5c2f29a6aea0719a9.tar.xz
cmd/compile: enable promoted field selectors as keys in struct literals
Switch the generated UIR version from V2 to V3. Adjust cmd/compile/internal/types to accept promoted field selectors in composite literals. Fixes #9859. Change-Id: Ie314e28567cfa6cf4c9e962a07b32dd05b06bf5e Reviewed-on: https://go-review.googlesource.com/c/go/+/755740 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/noder/unified.go')
-rw-r--r--src/cmd/compile/internal/noder/unified.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/noder/unified.go b/src/cmd/compile/internal/noder/unified.go
index 6cb52fb31b..14f19e3d1f 100644
--- a/src/cmd/compile/internal/noder/unified.go
+++ b/src/cmd/compile/internal/noder/unified.go
@@ -25,8 +25,8 @@ import (
)
// uirVersion is the unified IR version to use for encoding/decoding.
-// Use V2 as the encoded version for aliastypeparams.
-const uirVersion = pkgbits.V2
+// Use V3 for promoted struct field support in composite literals.
+const uirVersion = pkgbits.V3
// localPkgReader holds the package reader used for reading the local
// package. It exists so the unified IR linker can refer back to it