aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2023-05-15 02:31:56 +0200
committerTeddy Wing2023-05-15 02:31:56 +0200
commit06ed7801b5917d59258b25812347736a9992e6c6 (patch)
tree3cd0a2b763ecf592f527550e6e48d887a166f4c1
parent8f0ddc114a61cec9c49cb5c754ac225ea7b03513 (diff)
downloadgocapturedrefrace-06ed7801b5917d59258b25812347736a9992e6c6.tar.bz2
testdata/simple.go: Add a local variable in closure
We want to ignore local variables.
-rw-r--r--testdata/simple.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/testdata/simple.go b/testdata/simple.go
index dd9f74e..a039f49 100644
--- a/testdata/simple.go
+++ b/testdata/simple.go
@@ -11,5 +11,8 @@ func main() {
if capturedReference == 1 {
return
}
+
+ newVar := 0
+ newVar += 1
}()
}