mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Closures work
This commit is contained in:
@@ -823,7 +823,7 @@ static bool execFnCall(Interpreter* interpreter) {
|
||||
Literal ret = popLiteralArray(&returns);
|
||||
|
||||
//check the return types
|
||||
if (AS_TYPE(returnArray->literals[i]).typeOf != ret.type) {
|
||||
if (returnArray->count > 0 && AS_TYPE(returnArray->literals[i]).typeOf != ret.type) {
|
||||
printf(ERROR "ERROR: bad type found in return value\n" RESET);
|
||||
|
||||
//free, and skip out
|
||||
@@ -1066,7 +1066,6 @@ static void execInterpreter(Interpreter* interpreter) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void readInterpreterSections(Interpreter* interpreter) {
|
||||
//data section
|
||||
const short literalCount = readShort(interpreter->bytecode, &interpreter->count);
|
||||
|
||||
Reference in New Issue
Block a user