Fixed an argument list bug, found a casting bug

This commit is contained in:
2022-09-03 16:04:18 +01:00
parent 32d6b7124c
commit 86061cb74e
2 changed files with 19 additions and 0 deletions

View File

@@ -1450,6 +1450,13 @@ static bool execFnCall(Interpreter* interpreter) {
}
Literal arg = popLiteralArray(&arguments);
if (IS_IDENTIFIER(arg)) {
Literal idn = arg;
parseIdentifierToValue(interpreter, &arg);
freeLiteral(idn);
}
if (!setScopeVariable(inner.scope, paramArray->literals[i], arg, false)) {
printf(ERROR "[internal] Could not define parameter (bad type?)\n" RESET);
//free, and skip out