fix(kernel/type_checker): bug in new is_opaque method

This commit is contained in:
Leonardo de Moura 2014-09-25 12:24:14 -07:00
parent 1d92097781
commit 28796593e3

View file

@ -414,7 +414,7 @@ bool type_checker::is_opaque(declaration const & d) const {
bool type_checker::is_opaque(expr const & c) const {
lean_assert(is_constant(c));
if (auto d = m_env.find(const_name(c)))
return is_opaque(*d);
return d->is_definition() && is_opaque(*d);
else
return true;
}