adapted to the new GetFuncInfo() specification
This commit is contained in:
+1
-2
@@ -25,8 +25,7 @@ func evalVar(ctx ExprContext, self *term) (v any, err error) {
|
||||
var exists bool
|
||||
name := self.source()
|
||||
if v, exists = ctx.GetVar(name); !exists {
|
||||
info := ctx.GetFuncInfo(name)
|
||||
if info != nil {
|
||||
if info, exists := ctx.GetFuncInfo(name); exists {
|
||||
v = info.Functor()
|
||||
} else {
|
||||
err = fmt.Errorf("undefined variable or function %q", name)
|
||||
|
||||
Reference in New Issue
Block a user