title: OutOfScopeResult layout: article

OutOfScopeResult occurs when the name of a value implicitly returned by
an empty return statement is shadowed in a nested scope.

Example:
 func factor(n int) (i int) {
 	for i := 2; i {{raw "<"}} n; i++ {
 		if n%i == 0 {
 			return
 		}
 	}
 	return 0
 }