feat: add typed mem.set

This commit is contained in:
2026-10-05 18:54:43 +02:00
parent 9b273f2471
commit d88513e005
4 changed files with 32 additions and 1 deletions
+1
View File
@@ -10,6 +10,7 @@ import "@source/sema"
ast_renderer :: import "@source/ast/renderer"
test import "@std/mem"
test import "@std/enummap"
test import "@std/arraylist"
test import "@std/hashmap"
+1 -1
View File
@@ -58,7 +58,7 @@ resolve proc(
) Resolution ! (mem.AllocError | diagnostics.CapacityError) {
bindings :: try mem.alloc(Binding, allocator, ast.node_count(tree))
errdefer mem.free(allocator, bindings)
for (0..bindings.len) |i| bindings[i] = Binding{}
mem.set(bindings, Binding{})
state := State{
tree = tree,