aboutsummaryrefslogtreecommitdiffstats
path: root/testdata
diff options
context:
space:
mode:
authorTeddy Wing2023-05-15 22:01:00 +0200
committerTeddy Wing2023-05-15 22:01:00 +0200
commite4441d0d2e003d5a4adafc9a9aaa037b3be830b8 (patch)
tree7382c71a8f2ec573da1e2d94fbd956dd5e349c9d /testdata
parenta3515d6d5d52a84944b5bd0aaa863a50b3c1ec59 (diff)
downloadgocapturedrefrace-e4441d0d2e003d5a4adafc9a9aaa037b3be830b8.tar.bz2
Try getting `GenDecl`s in closure
Turns out this only gets declarations like: var decl string but not: decl := "a" Is there a way to get the above one too?
Diffstat (limited to 'testdata')
-rw-r--r--testdata/simple.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/testdata/simple.go b/testdata/simple.go
index d01a95e..76fb5d5 100644
--- a/testdata/simple.go
+++ b/testdata/simple.go
@@ -21,6 +21,10 @@ func main() {
str := "a"
strings.Repeat(str, 3)
+
+ var decl string
+ decl = "b"
+ strings.Repeat(decl, 2)
}(copied)
}