diff options
| -rw-r--r-- | gocapturedrefrace.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gocapturedrefrace.go b/gocapturedrefrace.go index 7f5d16d..3174a09 100644 --- a/gocapturedrefrace.go +++ b/gocapturedrefrace.go @@ -133,6 +133,11 @@ func checkClosure( return true } + _, ok = scopeObj.(*types.Var) + if !ok { + return true + } + if funcScope != scope { pass.Reportf( ident.Pos(), @@ -141,7 +146,6 @@ func checkClosure( ) } - // TODO: Ignore `aStruct` type // TODO: Report references in argument list return true |
