diff options
| author | Teddy Wing | 2023-05-16 20:15:41 +0200 |
|---|---|---|
| committer | Teddy Wing | 2023-05-16 20:15:41 +0200 |
| commit | 8003b534234a6684d567c932cf9033da7b8bf34b (patch) | |
| tree | a2ab84853225647f91222adcc4c20d8e93a85e1d /testdata | |
| parent | 5afcd02ea68efd3faba578bdcee853c028b14e0e (diff) | |
| download | gocapturedrefrace-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.go | 2 |
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 } |
