Merge branches 'master' and 'master' of https://chookspace.com/ground/ground

This commit is contained in:
2026-04-11 19:58:35 +10:00

View File

@@ -1900,7 +1900,7 @@ GroundValue interpretGroundInstruction(GroundInstruction inst, GroundScope* scop
runtimeError(ARG_TYPE_MISMATCH, "Expecting a Value", in, currentInstruction);
}
if (function->nativeFn) {
if (function->args[i].type != ANY || in->args.args[i + 1].value.value.type != function->args[i].type) {
if (function->args[i].type != ANY && in->args.args[i + 1].value.value.type != function->args[i].type) {
runtimeError(ARG_TYPE_MISMATCH, "Mismatched function argument types", in, currentInstruction);
}
} else {
@@ -2004,7 +2004,7 @@ GroundValue interpretGroundInstruction(GroundInstruction inst, GroundScope* scop
runtimeError(ARG_TYPE_MISMATCH, "Expecting a Value", in, currentInstruction);
}
if (function->nativeFn) {
if (function->args[i].type != ANY || in->args.args[i + 2].value.value.type != function->args[i].type) {
if (function->args[i].type != ANY && in->args.args[i + 2].value.value.type != function->args[i].type) {
runtimeError(ARG_TYPE_MISMATCH, "Mismatched function argument types", in, currentInstruction);
}
} else {