Remove problem storage in Type::Erroneous

This commit is contained in:
Ayaz Hafiz 2022-11-08 13:19:43 -06:00
parent b984351514
commit c9953129cb
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
9 changed files with 114 additions and 71 deletions

View file

@ -2980,11 +2980,7 @@ fn type_to_variable<'a>(
result
}
Erroneous => {
// TODO: remove `Erroneous`, `Error` can always be used, and type problems known at
// this point can be reported during canonicalization.
let problem_index =
SubsIndex::push_new(&mut subs.problems, types.get_problem(&typ).clone());
let content = Content::Structure(FlatType::Erroneous(problem_index));
let content = Content::Error;
register_with_known_var(subs, destination, rank, pools, content)
}