fix(kernel/environment): is_descendant optimization

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-05-08 18:48:25 -07:00
parent c843243f64
commit fca65a9d69

View file

@ -35,7 +35,7 @@ bool environment_id::is_descendant(environment_id const & id) const {
while (!is_nil(*it)) {
if (is_eqp(*it, id.m_trail))
return true;
if (car(*it) >= car(id.m_trail))
if (car(*it) < car(id.m_trail))
return false;
it = &cdr(*it);
}