fix(frontends/lean/parser): bug when parsing identifiers

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-07-02 08:36:25 -07:00
parent 9f9f93645b
commit f464775af6

View file

@ -832,7 +832,7 @@ expr parser::id_to_expr(name const & id, pos_info const & p) {
} }
r = save_pos(mk_choice(new_as.size(), new_as.data()), p); r = save_pos(mk_choice(new_as.size(), new_as.data()), p);
} }
if (m_no_undef_id_error) if (!r && m_no_undef_id_error)
r = save_pos(mk_constant(get_namespace(m_env) + id, ls), p); r = save_pos(mk_constant(get_namespace(m_env) + id, ls), p);
if (!r) if (!r)
throw parser_error(sstream() << "unknown identifier '" << id << "'", p); throw parser_error(sstream() << "unknown identifier '" << id << "'", p);