mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
use a NonNullableUnwrapped union for Box
This commit is contained in:
parent
b7e7059b36
commit
a9813aeae7
2 changed files with 35 additions and 3 deletions
|
@ -3206,8 +3206,13 @@ fn layout_from_flat_type<'a>(
|
|||
let inner_var = args[0];
|
||||
let inner_layout =
|
||||
cached!(Layout::from_var(env, inner_var), criteria, env.subs);
|
||||
|
||||
let repr = LayoutRepr::Union(UnionLayout::NonNullableUnwrapped(
|
||||
arena.alloc([inner_layout]),
|
||||
));
|
||||
|
||||
let boxed_layout = env.cache.put_in(Layout {
|
||||
repr: LayoutRepr::Boxed(inner_layout).direct(),
|
||||
repr: repr.direct(),
|
||||
semantic: SemanticRepr::NONE,
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue