Remove FlatType::Erroneous

This commit is contained in:
Ayaz Hafiz 2022-11-08 13:31:22 -06:00
parent 1974d8e848
commit 281bc94b55
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
13 changed files with 12 additions and 60 deletions

View file

@ -1979,7 +1979,7 @@ fn lambda_set_size(subs: &Subs, var: Variable) -> (usize, usize, usize) {
}
stack.push((*ext, depth_any + 1, depth_lset));
}
FlatType::Erroneous(_) | FlatType::EmptyRecord | FlatType::EmptyTagUnion => {}
FlatType::EmptyRecord | FlatType::EmptyTagUnion => {}
},
Content::FlexVar(_)
| Content::RigidVar(_)
@ -3188,7 +3188,6 @@ fn layout_from_flat_type<'a>(
layout_from_recursive_union(env, rec_var, &tags)
}
EmptyTagUnion => cacheable(Ok(Layout::VOID)),
Erroneous(_) => cacheable(Err(LayoutProblem::Erroneous)),
EmptyRecord => cacheable(Ok(Layout::UNIT)),
}
}