fix(frontends/lean/structure_cmd): inheriting defaulted field depending on field starting with implicit parameter
This commit is contained in:
parent
87b98d5aa2
commit
c4ebfab14c
2 changed files with 6 additions and 1 deletions
|
|
@ -466,7 +466,7 @@ struct structure_cmd_fn {
|
|||
return ::lean::mk_field_default_value(m_env, full_field_name, [&](name const & fname) {
|
||||
for (field_decl const & d : m_fields) {
|
||||
if (local_pp_name(d.first) == fname)
|
||||
return some_expr(d.first);
|
||||
return some_expr(mk_explicit(d.first));
|
||||
}
|
||||
return none_expr();
|
||||
});
|
||||
|
|
|
|||
5
tests/lean/run/struct_bug3.lean
Normal file
5
tests/lean/run/struct_bug3.lean
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
structure foo :=
|
||||
(f : Π {α : Type}, α)
|
||||
(g : Π {α : Type}, α := @f)
|
||||
|
||||
structure bar extends foo
|
||||
Loading…
Add table
Reference in a new issue