summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/ast-tree.c6
1 files changed, 5 insertions, 1 deletions
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;
}