aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2023-05-16 03:45:10 +0200
committerTeddy Wing2023-05-16 03:45:10 +0200
commit621747412c3802a8ab09a18b818403fda90adccd (patch)
tree7478a5aa22818119596f4ea052400c7e1ded20fb
parent25ca092939a76031e531ace87a457bbe9b29066d (diff)
downloadgocapturedrefrace-621747412c3802a8ab09a18b818403fda90adccd.tar.bz2
Add note about `(*types.Scope).LookupParent`
-rw-r--r--gocapturedrefrace.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/gocapturedrefrace.go b/gocapturedrefrace.go
index d8fc4ef..b4fe9db 100644
--- a/gocapturedrefrace.go
+++ b/gocapturedrefrace.go
@@ -108,6 +108,9 @@ func checkClosure(pass *analysis.Pass, funcLit *ast.FuncLit) {
}
}
+ // TODO: Use (*types.Scope).LookupParent with ident to find out
+ // whether a variable was defined in an outer scope.
+
pass.Reportf(
ident.Pos(),
"variable found %q",