mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Squashing bugs
This commit is contained in:
@@ -2,18 +2,11 @@ fn capture(count: int) {
|
|||||||
print count;
|
print count;
|
||||||
print capture;
|
print capture;
|
||||||
|
|
||||||
if (count < 5) {
|
if (count > 5) {
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
print count;
|
return capture(count + 1);
|
||||||
print capture;
|
|
||||||
|
|
||||||
count++;
|
|
||||||
count++;
|
|
||||||
|
|
||||||
// return capture(count + 1);
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print capture(52);
|
print capture(0);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ fn capture(count: int) {
|
|||||||
return capture(count + 1);
|
return capture(count + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert capture(0) == 5, "Self capture failed";
|
assert capture(0) == 6, "Self capture failed";
|
||||||
|
|
||||||
|
|
||||||
//test expressions as arguments
|
//test expressions as arguments
|
||||||
|
|||||||
@@ -1469,7 +1469,7 @@ static bool execFnCall(Interpreter* interpreter) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
freeLiteral(restType);
|
freeLiteral(restType);
|
||||||
freeLiteral(lit);
|
freeLiteralArray(&rest);
|
||||||
}
|
}
|
||||||
|
|
||||||
//execute the interpreter
|
//execute the interpreter
|
||||||
|
|||||||
Reference in New Issue
Block a user