mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-03 05:54:33 +00:00
fix: occur check bug
This commit is contained in:
parent
359329e593
commit
2e8810f10d
4 changed files with 18 additions and 3 deletions
|
@ -113,7 +113,7 @@ impl<'c, 'l, L: Locational> Unifier<'c, 'l, L> {
|
|||
self.occur(&lhs.return_t, &rhs.return_t)?;
|
||||
Ok(())
|
||||
}
|
||||
(Poly { params, .. }, FreeVar(fv)) if fv.is_unbound() => {
|
||||
/*(Poly { params, .. }, FreeVar(fv)) if fv.is_unbound() => {
|
||||
for param in params.iter().filter_map(|tp| {
|
||||
if let TyParam::Type(t) = tp {
|
||||
Some(t)
|
||||
|
@ -124,7 +124,7 @@ impl<'c, 'l, L: Locational> Unifier<'c, 'l, L> {
|
|||
self.occur_inner(param, maybe_sup)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}*/
|
||||
(FreeVar(fv), Poly { params, .. }) if fv.is_unbound() => {
|
||||
for param in params.iter().filter_map(|tp| {
|
||||
if let TyParam::Type(t) = tp {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue