From b6d6df161ffe493302d53e09dd1fd0e697ce4b4b Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Mon, 12 May 2014 14:22:23 -0700 Subject: [PATCH] fix(kernel/level): bug in get_undef_param Signed-off-by: Leonardo de Moura --- src/kernel/level.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kernel/level.cpp b/src/kernel/level.cpp index deb1e636a..0114162f2 100644 --- a/src/kernel/level.cpp +++ b/src/kernel/level.cpp @@ -466,7 +466,7 @@ optional get_undef_param(level const & l, param_names const & ps) { for_each(l, [&](level const & l) { if (!has_param(l)) return false; - if (l.kind() == level_kind::Param && std::find(ps.begin(), ps.end(), param_id(l)) != ps.end()) + if (is_param(l) && std::find(ps.begin(), ps.end(), param_id(l)) == ps.end()) r = param_id(l); return true; }); @@ -478,7 +478,7 @@ optional get_undef_global(level const & l, environment const & env) { for_each(l, [&](level const & l) { if (!has_global(l)) return false; - if (l.kind() == level_kind::Global && env.is_global_level(global_id(l))) + if (is_global(l) && env.is_global_level(global_id(l))) r = global_id(l); return true; });