forked from ground/ground
Fix -any again
This commit is contained in:
@@ -1900,7 +1900,7 @@ GroundValue interpretGroundInstruction(GroundInstruction inst, GroundScope* scop
|
|||||||
runtimeError(ARG_TYPE_MISMATCH, "Expecting a Value", in, currentInstruction);
|
runtimeError(ARG_TYPE_MISMATCH, "Expecting a Value", in, currentInstruction);
|
||||||
}
|
}
|
||||||
if (function->nativeFn) {
|
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);
|
runtimeError(ARG_TYPE_MISMATCH, "Mismatched function argument types", in, currentInstruction);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -2004,7 +2004,7 @@ GroundValue interpretGroundInstruction(GroundInstruction inst, GroundScope* scop
|
|||||||
runtimeError(ARG_TYPE_MISMATCH, "Expecting a Value", in, currentInstruction);
|
runtimeError(ARG_TYPE_MISMATCH, "Expecting a Value", in, currentInstruction);
|
||||||
}
|
}
|
||||||
if (function->nativeFn) {
|
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);
|
runtimeError(ARG_TYPE_MISMATCH, "Mismatched function argument types", in, currentInstruction);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user