fix(kernel/metavar): avoid crash due to stack overflow, closes #253

This commit is contained in:
Leonardo de Moura 2014-10-25 00:19:41 -07:00
parent 096c67b2e5
commit c30c0fa3b8

View file

@ -295,6 +295,7 @@ static bool all_unassigned(substitution const & subst, name_set const & s) {
name_set substitution::get_occs(name const & m, name_set & fresh) { name_set substitution::get_occs(name const & m, name_set & fresh) {
lean_assert(is_expr_assigned(m)); lean_assert(is_expr_assigned(m));
check_system("substitution occurs check");
if (fresh.contains(m)) { if (fresh.contains(m)) {
return *m_occs_map.find(m); return *m_occs_map.find(m);
} else if (name_set const * it = m_occs_map.find(m)) { } else if (name_set const * it = m_occs_map.find(m)) {