mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Don't eagerly walk down let bindings to specialize an ability
This commit is contained in:
parent
e5eae75ad6
commit
645c0f2738
1 changed files with 6 additions and 0 deletions
|
@ -2504,6 +2504,12 @@ fn resolve_abilities_in_specialized_body<'a>(
|
||||||
// are themselves specialized, so we'll handle ability resolution in them at
|
// are themselves specialized, so we'll handle ability resolution in them at
|
||||||
// that time too.
|
// that time too.
|
||||||
}
|
}
|
||||||
|
Expr::LetRec(..) | Expr::LetNonRec(..) => {
|
||||||
|
// Also don't walk down let-bindings. These may be generalized and we won't
|
||||||
|
// know their specializations until we collect them while building up the def.
|
||||||
|
// So, we'll resolve any nested abilities when we know their specialized type
|
||||||
|
// during def construction.
|
||||||
|
}
|
||||||
Expr::AbilityMember(member_sym, specialization_cell) => {
|
Expr::AbilityMember(member_sym, specialization_cell) => {
|
||||||
let mut specialization_cell = specialization_cell
|
let mut specialization_cell = specialization_cell
|
||||||
.write()
|
.write()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue