adapted to the new GetFuncInfo() specification

This commit is contained in:
2024-04-26 04:36:03 +02:00
parent 761ec868e6
commit d354102c6a
4 changed files with 6 additions and 9 deletions
+1 -2
View File
@@ -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)