fix(frontends/lean/elaborator): missing constraint
This commit is contained in:
parent
5087f03889
commit
d9afb3ca96
1 changed files with 4 additions and 2 deletions
|
@ -781,11 +781,13 @@ public:
|
|||
f_type = whnf(f_type, cs);
|
||||
if (!is_pi(f_type) && has_metavar(f_type)) {
|
||||
constraint_seq saved_cs = cs;
|
||||
f_type = whnf(f_type, cs);
|
||||
if (!is_pi(f_type) && is_meta(f_type)) {
|
||||
expr new_f_type = whnf(f_type, cs);
|
||||
if (!is_pi(new_f_type) && is_meta(new_f_type)) {
|
||||
cs = saved_cs;
|
||||
// let type checker add constraint
|
||||
f_type = m_tc[m_relax_main_opaque]->ensure_pi(f_type, f, cs);
|
||||
} else {
|
||||
f_type = new_f_type;
|
||||
}
|
||||
}
|
||||
if (!is_pi(f_type)) {
|
||||
|
|
Loading…
Reference in a new issue