diff options
| author | Teddy Wing | 2023-05-16 03:45:10 +0200 |
|---|---|---|
| committer | Teddy Wing | 2023-05-16 03:45:10 +0200 |
| commit | 621747412c3802a8ab09a18b818403fda90adccd (patch) | |
| tree | 7478a5aa22818119596f4ea052400c7e1ded20fb | |
| parent | 25ca092939a76031e531ace87a457bbe9b29066d (diff) | |
| download | gocapturedrefrace-621747412c3802a8ab09a18b818403fda90adccd.tar.bz2 | |
Add note about `(*types.Scope).LookupParent`
| -rw-r--r-- | gocapturedrefrace.go | 3 |
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", |
