fix(library/unifier): occurs-check bug
This commit is contained in:
parent
5830da9e2d
commit
096c67b2e5
1 changed files with 6 additions and 0 deletions
|
@ -151,6 +151,12 @@ occurs_check_status occurs_context_check(substitution & s, expr const & e, expr
|
||||||
return has_expr_metavar(e) || has_local(e);
|
return has_expr_metavar(e) || has_local(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (r != occurs_check_status::Ok)
|
||||||
|
return r;
|
||||||
|
for (expr const & local : locals) {
|
||||||
|
if (s.occurs(m, mlocal_type(local)))
|
||||||
|
return occurs_check_status::Maybe;
|
||||||
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue