summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 0de6dd8..1d202c5 100644
--- a/eval.c
+++ b/eval.c
@@ -867,7 +867,7 @@ ut_execute_call(struct ut_state *state, struct ut_opcode *op)
struct json_object *rv;
char *lhs;
- if (!decl) {
+ if (!decl || decl->type != T_FUNC) {
lhs = ut_ref_to_str(op->operand[0]);
rv = ut_exception(state, op->operand[0],
"Type error: %s is not a function",