fix(library/unifier): fix cryptic error message
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
e79b0b11cf
commit
70c887a0bd
3 changed files with 8 additions and 5 deletions
|
@ -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
5
tests/lean/empty.lean
Normal file
|
@ -0,0 +1,5 @@
|
|||
import logic hilbert
|
||||
|
||||
definition v1 : Prop := epsilon (λ x, true)
|
||||
inductive Empty : Type
|
||||
definition v2 : Empty := epsilon (λ x, true)
|
2
tests/lean/empty.lean.expected.out
Normal file
2
tests/lean/empty.lean.expected.out
Normal file
|
@ -0,0 +1,2 @@
|
|||
empty.lean:5:25: error: empty.lean:5:25: failed to synthesize placeholder
|
||||
⊢ inhabited Empty
|
Loading…
Add table
Reference in a new issue