about summary refs log tree commit diff
path: root/boot/transpile.c
diff options
context:
space:
mode:
Diffstat (limited to 'boot/transpile.c')
-rw-r--r--boot/transpile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/boot/transpile.c b/boot/transpile.c
index e0af3bf..af601f0 100644
--- a/boot/transpile.c
+++ b/boot/transpile.c
@@ -115,7 +115,7 @@ struct Type*
 transpile_type_at(struct Transpiler* transpiler, Type_Id id)
 {
     if (id >= array_length(&transpiler->unit->types.entries)) return nil;
-    return *array_at(struct Type*, &transpiler->unit->types.entries, id);
+    return unit_get_type(transpiler->unit, id);
 }
 
 // the c-side form of a primitive catskill type.
@@ -946,7 +946,7 @@ transpile_unit(struct Transpiler* transpiler, struct Unit* unit)
     // pass 2: type definitions
     visit->table = &transpile_definition_visit_functions;
     FOR_EACH_ARRAY (Type_Id, ordered_id, &unit->type_emission_order) {
-        struct Type* type = *array_at(struct Type*, &unit->types.entries, *ordered_id);
+        struct Type* type = unit_get_type(unit, *ordered_id);
         VISIT(visit_type, type);
     }