diff options
| -rw-r--r-- | gocapturedrefrace.go | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/gocapturedrefrace.go b/gocapturedrefrace.go index 79c6d87..c49b399 100644 --- a/gocapturedrefrace.go +++ b/gocapturedrefrace.go @@ -121,6 +121,12 @@ func checkClosure(  			fmt.Println("LookupParent:")  			fmt.Printf("    scope: %#v\n", scope)  			fmt.Printf("    obj  : %#v\n", scopeObj) +			// If scope and scopeObj are nil, then variable is local + +			// This also means variable is local. +			if funcScope == scope { +				fmt.Printf("In function scope %v\n", scopeObj) +			}  			pass.Reportf(  				ident.Pos(), | 
