mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
Fix type errors
This commit is contained in:
parent
fe2f2b2027
commit
28d6f30cc7
4 changed files with 41 additions and 20 deletions
|
@ -3679,22 +3679,19 @@ fn run_solve_solve(
|
|||
|
||||
// STORE ABILITIES
|
||||
let module_id = module.module_id;
|
||||
let known_specializations =
|
||||
abilities_store
|
||||
.get_known_specializations()
|
||||
.filter(|(member, typ)| {
|
||||
// This module solved this specialization if either the member or the type comes from the
|
||||
// module.
|
||||
member.module_id() == module_id || typ.module_id() == module_id
|
||||
});
|
||||
let solved_specializations: SolvedSpecializations = abilities_store
|
||||
.iter_specializations()
|
||||
.filter(|((member, typ), _)| {
|
||||
// This module solved this specialization if either the member or the type comes from the
|
||||
// module.
|
||||
member.module_id() == module_id || typ.module_id() == module_id
|
||||
})
|
||||
.collect();
|
||||
|
||||
let mut solved_specializations: SolvedSpecializations = VecMap::default();
|
||||
let mut specialization_symbols = VecSet::default();
|
||||
for (member, typ) in known_specializations {
|
||||
let specialization = abilities_store.get_specialization(member, typ).unwrap();
|
||||
specialization_symbols.insert(specialization.symbol);
|
||||
solved_specializations.insert((member, typ), specialization);
|
||||
}
|
||||
let specialization_symbols: VecSet<_> = solved_specializations
|
||||
.values()
|
||||
.map(|ms| ms.symbol)
|
||||
.collect();
|
||||
// END STORE ABILITIES
|
||||
|
||||
// Expose anything that is explicitly exposed by the header, or is a specialization of an
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue