This commit is contained in:
Folkert 2021-06-21 23:24:55 +02:00
parent 84855dae5e
commit e80f8a5114
2 changed files with 15 additions and 42 deletions

View file

@ -5674,7 +5674,9 @@ fn store_tag_pattern<'a>(
) -> StorePattern<'a> {
use Pattern::*;
let write_tag = union_layout.stores_tag();
// rosetree-like structures don't store the tag ID, the others do from the perspective of the IR
// The backend can make different choices there (and will, for UnionLayout::NullableUnwrapped)
let write_tag = !matches!(union_layout, UnionLayout::NonNullableUnwrapped(_));
let mut arg_layouts = Vec::with_capacity_in(arguments.len(), env.arena);
let mut is_productive = false;