mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Syntactic ability links in solve
This commit is contained in:
parent
4d0c1e6a9c
commit
d2da395619
5 changed files with 115 additions and 130 deletions
|
@ -445,13 +445,19 @@ fn canonicalize_claimed_ability_impl<'a>(
|
|||
name: label_str.to_owned(),
|
||||
region,
|
||||
});
|
||||
|
||||
return Err(());
|
||||
}
|
||||
};
|
||||
|
||||
match scope.lookup_ability_member_shadow(member_symbol) {
|
||||
Some(symbol) => {
|
||||
return Ok((member_symbol, symbol));
|
||||
Some(impl_symbol) => {
|
||||
// TODO: get rid of register_specializing_symbol
|
||||
scope
|
||||
.abilities_store
|
||||
.register_specializing_symbol(impl_symbol, member_symbol);
|
||||
|
||||
Ok((member_symbol, impl_symbol))
|
||||
}
|
||||
None => {
|
||||
env.problem(Problem::ImplementationNotFound {
|
||||
|
|
|
@ -327,10 +327,6 @@ impl Scope {
|
|||
Err((loc_original_shadow.region, shadow, shadow_symbol))
|
||||
}
|
||||
None => {
|
||||
// TODO: remove register_specializing_symbol
|
||||
self.abilities_store
|
||||
.register_specializing_symbol(shadow_symbol, original_symbol);
|
||||
|
||||
self.shadows
|
||||
.insert(original_symbol, Loc::at(region, shadow_symbol));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue