distinct type aliasing

This commit is contained in:
2026-06-23 12:29:21 +02:00
parent 6512ccd543
commit f16f352d1e
15 changed files with 525 additions and 58 deletions
+5
View File
@@ -1320,6 +1320,11 @@ canonical_type :: proc(
mapping[index] = value if !types.is_valid(resolved) else resolved
return mapping[index]
}
if item.kind == .Distinct {
mapping[index] = value
module.type_store.nodes[index].child = canonical_type(module, item.child, mapping, visiting)
return value
}
if item.kind == .Struct || item.kind == .Union {
mapping[index] = value
fields := types.fields_for(&module.type_store, value)