]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.24] 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>
Tue, 25 Mar 2025 16:47:46 +0000 (09:47 -0700)
commit311096a6a2930b69767a8a4a1f0c6ca78d3305b5
treee20362cbd35d3ecf78495bcb4188958824bb1b3a
parente9162e7e22e6030f52c275fdafe789d8ef73d882
[release-branch.go1.24] 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.

For #72122
For #72826

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>
(cherry picked from commit fe9b292b11355af6b5f6e1d9247b88fa134657ed)
Reviewed-on: https://go-review.googlesource.com/c/go/+/657695
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@google.com>
src/cmd/compile/internal/types2/check.go
src/go/types/check.go