feat(frontends/lean/elaborator): improve error message
This commit is contained in:
parent
a60f4e2699
commit
3bc5cf8d0e
1 changed files with 2 additions and 1 deletions
|
|
@ -2027,7 +2027,8 @@ expr_pair elaborator::elaborate_with_type(expr const & e, expr const & e_type) {
|
|||
} else {
|
||||
auto pp_fn = mk_pp_ctx();
|
||||
throw elaborator_exception(ref,
|
||||
format("type mismatch, expression has type") + pp_indent(pp_fn, inferred_type) +
|
||||
format("type mismatch, expression") + pp_indent(pp_fn, new_e) +
|
||||
line() + format("has type") + pp_indent(pp_fn, inferred_type) +
|
||||
line() + format("but is expected to have type") + pp_indent(pp_fn, new_e_type));
|
||||
}
|
||||
return mk_pair(new_e, new_e_type);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue