struct type construction
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user