mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
don't use pointer as union child
This commit is contained in:
parent
2332ec3133
commit
c21f80ea24
1 changed files with 1 additions and 3 deletions
|
@ -219,10 +219,8 @@ fn specialize_drops_stmt<'a, 'i>(
|
|||
structure,
|
||||
tag_id,
|
||||
union_layout: _,
|
||||
index,
|
||||
index: _,
|
||||
} => {
|
||||
// TODO perhaps we need the union_layout later as well? if so, create a new function/map to store it.
|
||||
environment.add_union_child(*structure, *binding, *tag_id, *index);
|
||||
// Generated code might know the tag of the union without switching on it.
|
||||
// So if we UnionFieldPtrAtIndex, we must know the tag and we can use it to specialize the drop.
|
||||
environment.symbol_tag.insert(*structure, *tag_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue