fix(frontends/lean/elaborator): fixes #965
This commit is contained in:
parent
42fbc63bb6
commit
0268f92eb4
2 changed files with 8 additions and 1 deletions
|
@ -969,7 +969,7 @@ expr elaborator::visit_lambda(expr const & e, constraint_seq & cs) {
|
|||
|
||||
expr elaborator::visit_typed_expr(expr const & e, constraint_seq & cs) {
|
||||
constraint_seq t_cs;
|
||||
expr t = visit(get_typed_expr_type(e), t_cs);
|
||||
expr t = ensure_type(visit_expecting_type(get_typed_expr_type(e), t_cs), t_cs);
|
||||
constraint_seq v_cs;
|
||||
expr v = visit_expecting_type_of(get_typed_expr_expr(e), t, v_cs);
|
||||
expr v_type = infer_type(v, v_cs);
|
||||
|
|
7
tests/lean/run/965.lean
Normal file
7
tests/lean/run/965.lean
Normal file
|
@ -0,0 +1,7 @@
|
|||
import algebra.bundled
|
||||
variable G : Group
|
||||
check (1 : G)
|
||||
check (1 : Group.carrier G)
|
||||
set_option pp.coercions true
|
||||
check (1 : G)
|
||||
check (1 : Group.carrier G)
|
Loading…
Reference in a new issue