fix(library/unifier): bug in mk_imitiation_arg
Remove bogus constraint cs.push_back(mk_eq_cnstr(mk_app(maux_type, locals), type, j, relax)); This constraint is incorrect because 'type' may contain local constants that are not in 'locals'. We just rely on cs.push_back(mk_eq_cnstr(mk_app(maux, margs), arg, j, relax)); When maux is assigned, the system will inforce that its type (which is based on maux_type) must be type correct Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
cb8185f016
commit
d47d326cef
1 changed files with 0 additions and 1 deletions
|
@ -1453,7 +1453,6 @@ struct unifier_fn {
|
||||||
} else {
|
} else {
|
||||||
expr maux_type = mk_metavar(u.m_ngen.next(), Pi(locals, mk_sort(mk_meta_univ(u.m_ngen.next()))));
|
expr maux_type = mk_metavar(u.m_ngen.next(), Pi(locals, mk_sort(mk_meta_univ(u.m_ngen.next()))));
|
||||||
expr maux = mk_metavar(u.m_ngen.next(), Pi(locals, mk_app(maux_type, locals)));
|
expr maux = mk_metavar(u.m_ngen.next(), Pi(locals, mk_app(maux_type, locals)));
|
||||||
cs.push_back(mk_eq_cnstr(mk_app(maux_type, locals), type, j, relax));
|
|
||||||
cs.push_back(mk_eq_cnstr(mk_app(maux, margs), arg, j, relax));
|
cs.push_back(mk_eq_cnstr(mk_app(maux, margs), arg, j, relax));
|
||||||
return mk_app(maux, locals);
|
return mk_app(maux, locals);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue