Squashing bugs

This commit is contained in:
2022-09-03 08:45:06 +01:00
parent 4ad33a3082
commit 1b8559f0ef
3 changed files with 5 additions and 12 deletions

View File

@@ -2,18 +2,11 @@ fn capture(count: int) {
print count;
print capture;
if (count < 5) {
if (count > 5) {
return count;
}
print count;
print capture;
count++;
count++;
// return capture(count + 1);
return -1;
return capture(count + 1);
}
print capture(52);
print capture(0);

View File

@@ -39,7 +39,7 @@ fn capture(count: int) {
return capture(count + 1);
}
assert capture(0) == 5, "Self capture failed";
assert capture(0) == 6, "Self capture failed";
//test expressions as arguments