]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: add check for map value completeness in IndexExpr
authorMark Freeman <mark@golang.org>
Tue, 20 Jan 2026 19:23:19 +0000 (14:23 -0500)
committerGopher Robot <gobot@golang.org>
Tue, 27 Jan 2026 15:52:07 +0000 (07:52 -0800)
commita977717393fd779921ca258988230dbc741f5912
treea12ac0383308094d631da9adb5acb19b5cffca5a
parent8ca47fab421e99306afb6f7a0941d85f579ae3c0
go/types, types2: add check for map value completeness in IndexExpr

An index expression can also go from map[K]V to V. Since V could be
incomplete (due to some admittedly contrived syntax), we need a
check.

Change-Id: I03ffbfc0e5bcc9129591d60dfbaa5fafcf8fb183
Reviewed-on: https://go-review.googlesource.com/c/go/+/737620
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
src/cmd/compile/internal/types2/index.go
src/go/types/index.go
src/internal/types/testdata/check/cycles6.go