mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
Merge pull request #2050 from rtfeldman/empty-tags-and-unions
Canonicalize to empty tags and unions
This commit is contained in:
commit
b3ecc16b16
4 changed files with 71 additions and 27 deletions
|
@ -1578,9 +1578,7 @@ fn layout_from_flat_type<'a>(
|
|||
|
||||
Ok(Layout::Union(union_layout))
|
||||
}
|
||||
EmptyTagUnion => {
|
||||
panic!("TODO make Layout for empty Tag Union");
|
||||
}
|
||||
EmptyTagUnion => Ok(Layout::Union(UnionLayout::NonRecursive(&[]))),
|
||||
Erroneous(_) => Err(LayoutProblem::Erroneous),
|
||||
EmptyRecord => Ok(Layout::Struct(&[])),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue