This commit is contained in:
Francesco Cozzuto
2021-11-30 22:46:43 +01:00
parent d70fa14856
commit c6387154b0
2 changed files with 9 additions and 7 deletions
+8 -4
View File
@@ -6,8 +6,12 @@ print('The list contains ', count(l), ' items.\n');
print('The list is: ', l, '.\n'); print('The list is: ', l, '.\n');
fun fail() fun fail(p, fail)
assert(false); {
if p == 5:
assert(false);
else
fail(p+1, fail);
}
fail(0, fail);
fail();
+1 -3
View File
@@ -68,11 +68,9 @@ static Object *select(Object *self, Object *key, Heap *heap, Error *err)
return Object_FromNativeFunction(bm->runtime, bin_assert, -1, heap, err); return Object_FromNativeFunction(bm->runtime, bin_assert, -1, heap, err);
return NULL; return NULL;
} }
default: NULL;
} }
UNREACHABLE; // Not found.
return NULL; return NULL;
} }