close some gaps in the type system

This commit is contained in:
2026-07-19 01:01:11 +02:00
parent c7e3162ecb
commit 95f90cc306
12 changed files with 367 additions and 78 deletions
+1
View File
@@ -7,6 +7,7 @@ handles_append test {
try append(&list, 42)
try testing.expect_type(usize, list.items.len)
try testing.expect_equal(1, list.items.len)
try testing.expect_equal(42, list.items[0])
}
+4
View File
@@ -24,6 +24,10 @@ expect_equal func($T type, expected, actual T, location SourceLocation) void ! E
}
}
expect_type func($Expected, $Actual type, _ Actual, location SourceLocation) void ! Error {
try expect($(Expected == Actual), location)
}
run func(name []u8, callback *func() void ! Error) bool {
callback() catch |_| {
debug.print("{s} [failed]\n", {name,})