Control vars are now stored in the globalCtx only.
However, it is still allowed to store control var in a local context in special situation
This commit is contained in:
+2
-1
@@ -34,7 +34,8 @@ func evalContextValue(ctx ExprContext, self *term) (v any, err error) {
|
||||
if formatter, ok := sourceCtx.(Formatter); ok {
|
||||
v = formatter.ToString(0)
|
||||
} else {
|
||||
keys := sourceCtx.EnumVars(func(name string) bool { return name[0] != '_' })
|
||||
// keys := sourceCtx.EnumVars(func(name string) bool { return name[0] != '_' })
|
||||
keys := sourceCtx.EnumVars(nil)
|
||||
d := make(map[string]any)
|
||||
for _, key := range keys {
|
||||
d[key], _ = sourceCtx.GetVar(key)
|
||||
|
||||
Reference in New Issue
Block a user