mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
remove MultiTagUnion
This commit is contained in:
parent
8a36c20559
commit
65f4ff9663
4 changed files with 7 additions and 25 deletions
|
@ -1021,7 +1021,6 @@ pub enum Wrapped {
|
|||
RecordOrSingleTagUnion,
|
||||
/// Like a rose tree; recursive, but only one tag
|
||||
LikeARoseTree,
|
||||
MultiTagUnion,
|
||||
}
|
||||
|
||||
impl Wrapped {
|
||||
|
@ -1033,14 +1032,7 @@ impl Wrapped {
|
|||
}
|
||||
|
||||
pub fn is_indexable(layout: &Layout<'_>) -> bool {
|
||||
match layout {
|
||||
Layout::Struct(fields) => match fields.len() {
|
||||
_ => true,
|
||||
},
|
||||
|
||||
Layout::Union(variant) => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(layout, Layout::Struct(_) | Layout::Union(_))
|
||||
}
|
||||
|
||||
pub fn opt_from_layout(layout: &Layout<'_>) -> Option<Self> {
|
||||
|
@ -2141,8 +2133,6 @@ fn specialize_external<'a>(
|
|||
(Some(closure_layout), CapturedSymbols::Captured(captured)) => {
|
||||
// debug_assert!(!captured.is_empty());
|
||||
|
||||
let wrapped = closure_layout.get_wrapped();
|
||||
|
||||
match closure_layout.layout_for_member(proc_name) {
|
||||
ClosureRepresentation::Union {
|
||||
tag_layout: field_layouts,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue