mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Merge pull request #3321 from rtfeldman/abilities-stuff
A few changes to abilities in support of derived impls
This commit is contained in:
commit
e8ce12be02
7 changed files with 85 additions and 63 deletions
|
@ -101,8 +101,10 @@ pub enum Expr {
|
|||
AbilityMember(
|
||||
/// Actual member name
|
||||
Symbol,
|
||||
/// Specialization to use, and its variable
|
||||
SpecializationId,
|
||||
/// Specialization to use, and its variable.
|
||||
/// The specialization id may be [`None`] if construction of an ability member usage can
|
||||
/// prove the usage is polymorphic.
|
||||
Option<SpecializationId>,
|
||||
Variable,
|
||||
),
|
||||
|
||||
|
@ -1353,7 +1355,7 @@ fn canonicalize_var_lookup(
|
|||
if scope.abilities_store.is_ability_member_name(symbol) {
|
||||
AbilityMember(
|
||||
symbol,
|
||||
scope.abilities_store.fresh_specialization_id(),
|
||||
Some(scope.abilities_store.fresh_specialization_id()),
|
||||
var_store.fresh(),
|
||||
)
|
||||
} else {
|
||||
|
@ -1376,7 +1378,7 @@ fn canonicalize_var_lookup(
|
|||
if scope.abilities_store.is_ability_member_name(symbol) {
|
||||
AbilityMember(
|
||||
symbol,
|
||||
scope.abilities_store.fresh_specialization_id(),
|
||||
Some(scope.abilities_store.fresh_specialization_id()),
|
||||
var_store.fresh(),
|
||||
)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue