mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-03 18:29:00 +00:00
fix: sub-unification bug
This commit is contained in:
parent
ab06244b2b
commit
0ce9a1a772
1 changed files with 4 additions and 1 deletions
|
@ -1389,7 +1389,10 @@ impl<'c, 'l, 'u, L: Locational> Unifier<'c, 'l, 'u, L> {
|
|||
self.sub_unify(maybe_sub, &sup)?;
|
||||
}
|
||||
let mut new_sub = self.ctx.union(maybe_sub, &sub);
|
||||
if maybe_sub.qual_name() == sub.qual_name() && new_sub.has_unbound_var() {
|
||||
if !sub.is_recursive()
|
||||
&& maybe_sub.qual_name() == sub.qual_name()
|
||||
&& new_sub.has_unbound_var()
|
||||
{
|
||||
let list = UndoableLinkedList::new();
|
||||
if self
|
||||
.ctx
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue