diff --git a/src/interpreter.c b/src/interpreter.c index 023b597..3c199c9 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -1931,7 +1931,7 @@ GroundValue interpretGroundInstruction(GroundInstruction inst, GroundScope* scop } else { GroundScope newScope = copyGroundScope(&function->closure); for (size_t i = 0; i < function->argSize; i++) { - if (function->args[i].type == ANY || in->args.args[i + 1].type != VALUE) { + if (in->args.args[i + 1].type != VALUE) { runtimeError(ARG_TYPE_MISMATCH, "Expecting a Value", in, currentInstruction); } if (function->args[i].type == ANY || function->args[i].type == ANY || !checkFnTypes(&in->args.args[i + 1].value.value, &function->args[i])) {