fix: sub unification bug

This commit is contained in:
Shunsuke Shibayama 2024-02-16 18:31:49 +09:00
parent 5f652f3dd5
commit 67a9f88f61
3 changed files with 14 additions and 9 deletions

View file

@ -2438,7 +2438,7 @@ impl Context {
}
}
fn detach_tp(&self, tp: TyParam, tv_cache: &mut TyVarCache) -> TyParam {
pub(crate) fn detach_tp(&self, tp: TyParam, tv_cache: &mut TyVarCache) -> TyParam {
match tp {
TyParam::FreeVar(fv) if fv.is_linked() => {
let tp = fv.crack().clone();