Correct imports of Encode and abilities across modules

This commit is contained in:
Ayaz Hafiz 2022-05-11 12:36:29 -04:00
parent 47c9959786
commit 312cdd0b70
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
15 changed files with 375 additions and 214 deletions

View file

@ -314,7 +314,7 @@ impl Aliases {
let (typ, delayed_variables, &mut kind) =
match self.aliases.iter_mut().find(|(s, _, _, _)| *s == symbol) {
None => return Err(()),
None => panic!("{:?}", &self.aliases),
Some((_, typ, delayed_variables, kind)) => (typ, delayed_variables, kind),
};
@ -1495,7 +1495,9 @@ fn check_ability_specialization(
// inferred type for the specialization actually aligns with the expected
// implementation.
if let Some((root_symbol, root_data)) = abilities_store.root_name_and_def(symbol) {
let root_signature_var = root_data.signature_var;
let root_signature_var = root_data
.signature_var()
.unwrap_or_else(|| internal_error!("Signature var not resolved for {:?}", root_symbol));
// Check if they unify - if they don't, then the claimed specialization isn't really one,
// and that's a type error!