fix(library/unifier): occurs-check bug

This commit is contained in:
Leonardo de Moura 2014-10-25 00:13:00 -07:00
parent 5830da9e2d
commit 096c67b2e5

View file

@ -151,6 +151,12 @@ occurs_check_status occurs_context_check(substitution & s, expr const & e, expr
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;
}