]> Cypherpunks repositories - gostls13.git/commit
go/types,types2: allocate the used* maps in initFiles
authorRob Findley <rfindley@google.com>
Fri, 7 Mar 2025 18:13:51 +0000 (18:13 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 7 Mar 2025 18:54:49 +0000 (10:54 -0800)
commitfe9b292b11355af6b5f6e1d9247b88fa134657ed
tree9caf079697a20150a31c463de86a90d43efba5c2
parentd43c0f80d80ff274d30e46fa3737deb8863d7094
go/types,types2: allocate the used* maps in initFiles

As described in the associated comment, we need to reallocate usedVars
and usedPkgNames in initFiles, as they are nilled out at the end of
Checker.Files, which may be called multiple times.

Fixes #72122

Change-Id: I9f6eb86e072d9d43a8720f6a5e86d827de6006a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/655437
Auto-Submit: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/cmd/compile/internal/types2/check.go
src/go/types/check.go