fix(frontends/lean/elaborator): instantiate assigned metavariables before collecting unassigned ones

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-07-25 15:02:33 -07:00
parent 0f12e5a35b
commit 1c191c1ec7

View file

@ -1120,9 +1120,12 @@ public:
}
}
expr solve_unassigned_mvars(substitution & subst, expr const & e, name_set & visited) {
expr solve_unassigned_mvars(substitution & subst, expr e, name_set & visited) {
e = subst.instantiate(e);
buffer<expr> mvars;
collect_metavars(e, mvars);
if (mvars.empty())
return e;
for (auto mvar : mvars) {
check_interrupted();
solve_unassigned_mvar(subst, mvar, visited);