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

@ -715,13 +715,6 @@ trait DerivableVisitor {
}
EmptyRecord => Self::visit_empty_record(var)?,
EmptyTagUnion => Self::visit_empty_tag_union(var)?,
Erroneous(_) => {
return Err(NotDerivable {
var,
context: NotDerivableContext::NoContext,
})
}
},
Alias(
Symbol::NUM_NUM | Symbol::NUM_INTEGER | Symbol::NUM_FLOATINGPOINT,

View file

@ -1490,13 +1490,7 @@ fn solve(
let branches_content = subs.get_content_without_compacting(branches_var);
let already_have_error = matches!(
(real_content, branches_content),
(
Content::Error | Content::Structure(FlatType::Erroneous(_)),
_
) | (
_,
Content::Error | Content::Structure(FlatType::Erroneous(_))
)
(Content::Error, _) | (_, Content::Error)
);
let snapshot = subs.snapshot();
@ -3826,8 +3820,6 @@ fn adjust_rank_content(
rank
}
Erroneous(_) => group_rank,
}
}
@ -4076,7 +4068,7 @@ fn deep_copy_var_help(
Func(new_arguments, new_closure_var, new_ret_var)
}
same @ EmptyRecord | same @ EmptyTagUnion | same @ Erroneous(_) => same,
same @ EmptyRecord | same @ EmptyTagUnion => same,
Record(fields, ext_var) => {
let record_fields = {