mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
Dryasdust was a popular word in 1860
This commit is contained in:
parent
e31e89ac66
commit
798c28fccd
3 changed files with 7 additions and 9 deletions
|
@ -34,6 +34,7 @@ pub struct MemberSpecialization {
|
|||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct SpecializationId(u64);
|
||||
|
||||
#[allow(clippy::derivable_impls)] // let's be explicit about this
|
||||
impl Default for SpecializationId {
|
||||
fn default() -> Self {
|
||||
Self(0)
|
||||
|
|
|
@ -67,7 +67,7 @@ pub fn deep_copy_type_vars_into_expr<'a>(
|
|||
loc_elems: loc_elems.iter().map(|le| le.map(go_help)).collect(),
|
||||
},
|
||||
Var(sym) => Var(*sym),
|
||||
AbilityMember(sym, specialization) => AbilityMember(*sym, specialization.clone()),
|
||||
AbilityMember(sym, specialization) => AbilityMember(*sym, *specialization),
|
||||
When {
|
||||
loc_cond,
|
||||
cond_var,
|
||||
|
|
|
@ -2560,7 +2560,7 @@ fn resolve_abilities_in_specialized_body<'a>(
|
|||
self.abilities_store
|
||||
.insert_resolved(*specialization_id, specialization);
|
||||
|
||||
debug_assert!(!self.specialized.contains(&specialization_id));
|
||||
debug_assert!(!self.specialized.contains(specialization_id));
|
||||
self.specialized.push(*specialization_id);
|
||||
}
|
||||
_ => walk_expr(self, expr),
|
||||
|
@ -7056,13 +7056,10 @@ fn can_reuse_symbol<'a>(
|
|||
use ReuseSymbol::*;
|
||||
|
||||
let symbol = match expr {
|
||||
AbilityMember(_, specialization_id) => {
|
||||
let specialization_symbol = env
|
||||
AbilityMember(_, specialization_id) => env
|
||||
.abilities_store
|
||||
.get_resolved(*specialization_id)
|
||||
.expect("Specialization must be known!");
|
||||
specialization_symbol
|
||||
}
|
||||
.expect("Specialization must be known!"),
|
||||
Var(symbol) => *symbol,
|
||||
_ => return NotASymbol,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue