fix(frontends/lean/structure_cmd): fixes #968
This commit is contained in:
parent
496c84dac6
commit
31cc0ebb6a
2 changed files with 16 additions and 0 deletions
|
@ -605,6 +605,7 @@ struct structure_cmd_fn {
|
||||||
expr tmp = Pi(m_params, Pi(m_fields, dummy));
|
expr tmp = Pi(m_params, Pi(m_fields, dummy));
|
||||||
collected_locals local_set;
|
collected_locals local_set;
|
||||||
::lean::collect_locals(tmp, local_set);
|
::lean::collect_locals(tmp, local_set);
|
||||||
|
collect_annonymous_inst_implicit(m_p, local_set);
|
||||||
sort_locals(local_set.get_collected(), m_p, locals);
|
sort_locals(local_set.get_collected(), m_p, locals);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
15
tests/lean/run/968.lean
Normal file
15
tests/lean/run/968.lean
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
variables (A : Type) [inhabited A]
|
||||||
|
|
||||||
|
definition f (a : A) : A := a
|
||||||
|
|
||||||
|
check @f nat nat.is_inhabited
|
||||||
|
|
||||||
|
structure foo :=
|
||||||
|
(a : A)
|
||||||
|
|
||||||
|
check @foo nat nat.is_inhabited
|
||||||
|
|
||||||
|
inductive bla :=
|
||||||
|
| mk : A → bla
|
||||||
|
|
||||||
|
check @bla nat nat.is_inhabited
|
Loading…
Reference in a new issue