aboutsummaryrefslogtreecommitdiffstats
path: root/testdata/simple.go
diff options
context:
space:
mode:
authorTeddy Wing2023-05-16 21:05:21 +0200
committerTeddy Wing2023-05-16 21:05:21 +0200
commitad4b4956a5ac8d08b271417687e354e5c66491a8 (patch)
tree8c551290d37768325add0f30345046a90a1291ed /testdata/simple.go
parent2c3cbc5822e19a000b23a959ff70dd57be7757e2 (diff)
downloadgocapturedrefrace-ad4b4956a5ac8d08b271417687e354e5c66491a8.tar.bz2
Report reference-type closure arguments
Diffstat (limited to 'testdata/simple.go')
-rw-r--r--testdata/simple.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/testdata/simple.go b/testdata/simple.go
index 9fdf7a5..772b58c 100644
--- a/testdata/simple.go
+++ b/testdata/simple.go
@@ -35,7 +35,7 @@ func argumentReference() {
s := aStruct{field: 0}
- go func(s *aStruct) {
- s.field += 1 // want "reference s in goroutine closure"
+ go func(s *aStruct) { // want "reference s in goroutine closure"
+ s.field += 1
}(&s)
}