Fix the implementation of target specific variables
diff --git a/ast.go b/ast.go
index 902b6e8..b190536 100644
--- a/ast.go
+++ b/ast.go
@@ -44,7 +44,7 @@
}
return RecursiveVar{expr: v, origin: origin}
case "+=":
- prev := ev.LookupVar(lhs)
+ prev := ev.LookupVarInCurrentScope(lhs)
if !prev.IsDefined() {
v, _, err := parseExpr([]byte(ast.rhs), nil)
if err != nil {
@@ -54,7 +54,7 @@
}
return prev.Append(ev, ast.rhs)
case "?=":
- prev := ev.LookupVar(lhs)
+ prev := ev.LookupVarInCurrentScope(lhs)
if prev.IsDefined() {
return prev
}