mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Properly recast nested recursion pointers to their expanded layouts as needed
When we load a structure with a nested recursive pointer, the pointer may be loaded opaquely. We need to refine it to the concrete type wanted by the layout. This conversion can be removed after we upgrade to LLVM 15. Closes #5162
This commit is contained in:
parent
63ef4a486f
commit
3a960e7809
3 changed files with 59 additions and 25 deletions
|
@ -18,7 +18,9 @@ fn basic_type_from_record<'a, 'ctx, 'env>(
|
|||
let mut field_types = Vec::with_capacity_in(fields.len(), env.arena);
|
||||
|
||||
for field_layout in fields.iter() {
|
||||
field_types.push(basic_type_from_layout(env, layout_interner, *field_layout));
|
||||
let typ = basic_type_from_layout(env, layout_interner, *field_layout);
|
||||
|
||||
field_types.push(typ);
|
||||
}
|
||||
|
||||
env.context
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue