feat(frontends/lean): avoid warning message

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-02-09 09:26:51 -08:00
parent d6167eae32
commit b24c085cb0

View file

@ -830,7 +830,7 @@ void parser_imp::parse_using() {
if (it != m_using_decls.end()) if (it != m_using_decls.end())
diagnostic(m_io_state) << "warning: " << n << " will shadow " << it->second << endl; diagnostic(m_io_state) << "warning: " << n << " will shadow " << it->second << endl;
auto obj = m_env->find_object(n); auto obj = m_env->find_object(n);
if (obj) if (obj && n != obj->get_name())
diagnostic(m_io_state) << "warning: " << n << " will shadow " << obj->get_name() << endl; diagnostic(m_io_state) << "warning: " << n << " will shadow " << obj->get_name() << endl;
} }
m_using_decls.insert(n, p.second); m_using_decls.insert(n, p.second);