From 73eb217cbb9a4dd1b5e503eb4a38668d2f53ac87 Mon Sep 17 00:00:00 2001 From: Cheer Xiao Date: Mon, 19 Jan 2015 22:37:38 +0100 Subject: [PATCH] Update comment --- eval/compile.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eval/compile.go b/eval/compile.go index f607bd85..28ad9de8 100644 --- a/eval/compile.go +++ b/eval/compile.go @@ -140,7 +140,8 @@ func (cp *Compiler) mustResolveVar(name string, p parse.Pos) Type { // ResolveVar returns the type of a variable with supplied name, found in // current or upper scopes. If such a variable is nonexistent, a nil is -// returned. +// returned. When the value to resolve is not on the current scope, it is added +// to cp.enclosed. func (cp *Compiler) ResolveVar(name string) Type { thisScope := len(cp.scopes) - 1 for i := thisScope; i >= 0; i-- {