struct type construction

This commit is contained in:
2026-07-19 21:35:48 +02:00
parent 944648fce6
commit 59bbb197e0
15 changed files with 331415 additions and 253804 deletions
+2 -1
View File
@@ -369,7 +369,7 @@ struct_anonymous :: proc(store: ^Store, fields: []Field, tuple := false) -> Type
// Generated structs are nominal per comptime type-expression specialization.
// The checker owns canonicalization; this routine deliberately creates a fresh node.
struct_generated :: proc(store: ^Store, fields: []Field, tuple := false) -> Type {
struct_generated :: proc(store: ^Store, fields: []Field, tuple := false, c_layout := false) -> Type {
start := u32(len(store.fields))
append(&store.fields, ..fields)
id := DYNAMIC_START+Type(len(store.nodes))
@@ -378,6 +378,7 @@ struct_generated :: proc(store: ^Store, fields: []Field, tuple := false) -> Type
field_start=start,
field_count=u32(len(fields)),
tuple=tuple,
c_layout=c_layout,
declared=true,
})
return id