aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
authorcuishuang <imcusg@gmail.com>2025-11-24 14:38:30 +0800
committerDavid Chase <drchase@google.com>2025-12-08 14:39:36 -0800
commita33bbf1988685215cdf300feb47d2e356e459b3e (patch)
treef70860660f0c68abe6797067412ecd5456e1eca6 /test/codegen
parenta88a96330f312d08f5d191c66a463b165ac1b96d (diff)
downloadgo-a33bbf1988685215cdf300feb47d2e356e459b3e.tar.xz
weak: fix weak pointer test to correctly iterate over weak pointers after GC
This change fixes a bug in the weak pointer test where the loop was attempting to iterate over a nil slice (bt) instead of the weak pointer slice (wt). After setting bt to nil and running GC, the test should iterate over the weak pointers to verify they've been cleared, not attempt to iterate over the now-nil strong references. Change-Id: Ic0425f59da132257770ed87d1bcea5d2c0a54e07 Reviewed-on: https://go-review.googlesource.com/c/go/+/723600 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Sean Liao <sean@liao.dev>
Diffstat (limited to 'test/codegen')
0 files changed, 0 insertions, 0 deletions