From 8655602aa44c4ff65b4c6839ba804e4621e10338 Mon Sep 17 00:00:00 2001
From: A404M <ahmadmahmoudiprogrammer@gmail.com>
Date: Wed, 30 Apr 2025 03:00:52 +0330
Subject: add operators needed

---
 src/compiler/ast-tree.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'src/compiler/ast-tree.c')

diff --git a/src/compiler/ast-tree.c b/src/compiler/ast-tree.c
index d85f99d..676fafb 100644
--- a/src/compiler/ast-tree.c
+++ b/src/compiler/ast-tree.c
@@ -4659,7 +4659,6 @@ bool setTypesOperatorInfix(AstTree *tree, AstTreeSetTypesHelper _helper,
   AstTreeVariable *variable =
       setTypesFindVariable(str, str + str_size, helper, &functionCall);
   if (variable == NULL) {
-    printError(tree->str_begin, tree->str_end, "Can't find operator");
     return false;
   }
 
@@ -5756,6 +5755,11 @@ AstTreeVariable *setTypesFindVariable(const char *name_begin,
     CONTINUE_OUTER:
     }
   }
+  if (variable == NULL) {
+    printError(name_begin, name_end, "No candidates found for %.*s",
+               (int)(name_end - name_begin), name_begin);
+    return NULL;
+  }
 
   return variable;
 }
-- 
cgit v1.2.3