mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
remove field
This commit is contained in:
parent
4dd7ea1356
commit
c8970bbe45
4 changed files with 8 additions and 13 deletions
|
@ -1014,16 +1014,17 @@ fn path_to_expr_help<'a>(
|
|||
NonRecursive(layouts) | Recursive(layouts) => layouts[*tag_id as usize],
|
||||
NullableWrapped {
|
||||
nullable_id,
|
||||
nullable_layout,
|
||||
other_tags: layouts,
|
||||
..
|
||||
} => {
|
||||
use std::cmp::Ordering;
|
||||
dbg!(nullable_id, tag_id);
|
||||
match (*tag_id as usize).cmp(&(*nullable_id as usize)) {
|
||||
Ordering::Equal => &*env
|
||||
Ordering::Equal =>
|
||||
// the nullable tag is going to predent it stores a tag id
|
||||
&*env
|
||||
.arena
|
||||
.alloc([Layout::Builtin(nullable_layout.clone())]),
|
||||
.alloc([Layout::Builtin(crate::layout::TAG_SIZE)]),
|
||||
Ordering::Less => layouts[*tag_id as usize],
|
||||
Ordering::Greater => layouts[*tag_id as usize - 1],
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue