fix(library/tactic/exact_tactic): fixes #779

This commit is contained in:
Leonardo de Moura 2015-08-07 18:38:08 +01:00
parent f21647899f
commit 6a079fdd2d
3 changed files with 7 additions and 1 deletions

View file

@ -34,7 +34,7 @@ tactic exact_tactic(elaborate_fn const & elab, expr const & e, bool enforce_type
return none_proof_state();
}
expr t = head(gs).get_type();
bool report_unassigned = !allow_metavars && enforce_type_during_elaboration;
bool report_unassigned = !allow_metavars && enforce_type_during_elaboration && s.report_failure();
optional<expr> new_e;
try {
new_e = elaborate_with_respect_to(env, ios, elab, new_s, e, some_expr(t),

4
tests/lean/779.hlean Normal file
View file

@ -0,0 +1,4 @@
definition foo (x : empty) : empty :=
by try exact _;contradiction
print foo

View file

@ -0,0 +1,2 @@
definition foo : empty → empty :=
empty.rec (λ (e : empty), empty)