aboutsummaryrefslogtreecommitdiffstats
path: root/testdata
diff options
context:
space:
mode:
authorTeddy Wing2023-05-16 20:15:41 +0200
committerTeddy Wing2023-05-16 20:15:41 +0200
commit8003b534234a6684d567c932cf9033da7b8bf34b (patch)
treea2ab84853225647f91222adcc4c20d8e93a85e1d /testdata
parent5afcd02ea68efd3faba578bdcee853c028b14e0e (diff)
downloadgocapturedrefrace-8003b534234a6684d567c932cf9033da7b8bf34b.tar.bz2
Use scope test to report captured variables
Report all variables declared in an outer scope. This does match variables defined in the closure too. Will need to fix that.
Diffstat (limited to 'testdata')
-rw-r--r--testdata/simple.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/testdata/simple.go b/testdata/simple.go
index 8002953..9fdf7a5 100644
--- a/testdata/simple.go
+++ b/testdata/simple.go
@@ -12,7 +12,7 @@ func main() {
capturedReference2 += 1 // want "captured reference capturedReference2 in goroutine closure"
copied += 1
- if capturedReference == 1 {
+ if capturedReference == 1 { // want "captured reference capturedReference in goroutine closure"
return
}