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

@ -844,7 +844,7 @@ fn deep_copy_type_vars<C: CopyEnv>(
// Everything else is a mechanical descent.
Structure(flat_type) => match flat_type {
EmptyRecord | EmptyTagUnion | Erroneous(_) => Structure(flat_type),
EmptyRecord | EmptyTagUnion => Structure(flat_type),
Apply(symbol, arguments) => {
descend_slice!(arguments);

View file

@ -148,7 +148,6 @@ fn index_var(
FlatType::Func(_, _, _) | FlatType::FunctionOrTagUnion(_, _, _) => {
return Err(TypeError)
}
FlatType::Erroneous(_) => return Err(TypeError),
FlatType::Apply(Symbol::LIST_LIST, args) => {
match (subs.get_subs_slice(*args), ctor) {
([elem_var], IndexCtor::List) => {