mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Add a Newtype variant to LayoutWrapper
This commit is contained in:
parent
dd94d6ba16
commit
5274dbcd00
22 changed files with 348 additions and 265 deletions
|
@ -1206,8 +1206,8 @@ fn store_pattern_help<'a>(
|
|||
let mut fields = Vec::with_capacity_in(arguments.len(), env.arena);
|
||||
fields.extend(arguments.iter().map(|x| x.1));
|
||||
|
||||
let layout =
|
||||
layout_cache.put_in_no_semantic(LayoutRepr::struct_(fields.into_bump_slice()));
|
||||
let layout = layout_cache
|
||||
.put_in_direct_no_semantic(LayoutRepr::struct_(fields.into_bump_slice()));
|
||||
|
||||
return store_newtype_pattern(
|
||||
env,
|
||||
|
@ -1553,7 +1553,7 @@ fn store_tag_pattern<'a>(
|
|||
|
||||
if let LayoutRepr::RecursivePointer(_) = layout_cache.get_repr(arg_layout) {
|
||||
// TODO(recursive-layouts): fix after disjoint rec ptrs
|
||||
arg_layout = layout_cache.put_in_no_semantic(LayoutRepr::Union(union_layout));
|
||||
arg_layout = layout_cache.put_in_direct_no_semantic(LayoutRepr::Union(union_layout));
|
||||
}
|
||||
|
||||
let load = Expr::UnionAtIndex {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue