mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-30 12:51:10 +00:00
commit
7b95d3fc4d
2 changed files with 3 additions and 1 deletions
|
@ -1169,6 +1169,7 @@ impl Context {
|
||||||
if !st.is_generalized() {
|
if !st.is_generalized() {
|
||||||
self.substitute_typarams(&qt, &st);
|
self.substitute_typarams(&qt, &st);
|
||||||
}
|
}
|
||||||
|
self.sub_unify(&st, &qt, Location::Unknown, None).unwrap();
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1391,7 +1391,8 @@ impl Context {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
(Type::FreeVar(lfv), _) if lfv.is_unbound() => {
|
(Type::FreeVar(lfv), _) if lfv.is_unbound() => {
|
||||||
match &mut *lfv.borrow_mut() {
|
let lfv_ref = unsafe { lfv.as_ptr().as_mut().unwrap() };
|
||||||
|
match lfv_ref {
|
||||||
FreeKind::NamedUnbound { constraint, .. }
|
FreeKind::NamedUnbound { constraint, .. }
|
||||||
| FreeKind::Unbound { constraint, .. } => match constraint {
|
| FreeKind::Unbound { constraint, .. } => match constraint {
|
||||||
// sub !<: r => Error
|
// sub !<: r => Error
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue