]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: shorten object map assertion
authorMark Freeman <mark@golang.org>
Fri, 14 Nov 2025 20:04:28 +0000 (15:04 -0500)
committerGopher Robot <gobot@golang.org>
Mon, 24 Nov 2025 20:34:51 +0000 (12:34 -0800)
commite704b0993b69b564d7a0f515cf206f2cc9f1a342
tree83a1aa2cf78a1b646c98aaeaeb3a3bb026bb9899
parent02d1f3a06bc6900ad5c1b7c11b1fd38cbddef395
go/types, types2: shorten object map assertion

It's a fairly well-known invariant that each object must exist in the
object map and cannot be nil. This change just shortens a check of
that invariant.

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