fix(library/unifier): fix cryptic error message

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-07-25 21:10:32 -07:00
parent e79b0b11cf
commit 70c887a0bd
3 changed files with 8 additions and 5 deletions

View file

@ -431,11 +431,7 @@ struct unifier_fn {
}
if (in_conflict())
return false;
justification j1 = mk_justification(m, [=](formatter const & fmt, substitution const & subst) {
substitution s(subst);
return pp_type_mismatch(fmt, s.instantiate(m_type), s.instantiate(v_type));
});
if (!is_def_eq(m_type, v_type, mk_composite1(j1, j)))
if (!is_def_eq(m_type, v_type, j))
return false;
auto it = m_mvar_occs.find(mlocal_name(m));
if (it) {

5
tests/lean/empty.lean Normal file
View file

@ -0,0 +1,5 @@
import logic hilbert
definition v1 : Prop := epsilon (λ x, true)
inductive Empty : Type
definition v2 : Empty := epsilon (λ x, true)

View file

@ -0,0 +1,2 @@
empty.lean:5:25: error: empty.lean:5:25: failed to synthesize placeholder
⊢ inhabited Empty