Fix is_convertible propositions => type
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
1f6943e3a4
commit
682df7699d
2 changed files with 13 additions and 0 deletions
|
@ -244,6 +244,10 @@ class normalizer::imp {
|
||||||
if (m_env.is_ge(ty_level(*e), ty_level(*g)))
|
if (m_env.is_ge(ty_level(*e), ty_level(*g)))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_type(*e) && *g == mk_bool_type())
|
||||||
|
return true;
|
||||||
|
|
||||||
if (is_pi(*e) && is_pi(*g) && abst_domain(*e) == abst_domain(*g)) {
|
if (is_pi(*e) && is_pi(*g) && abst_domain(*e) == abst_domain(*g)) {
|
||||||
e = &abst_body(*e);
|
e = &abst_body(*e);
|
||||||
g = &abst_body(*g);
|
g = &abst_body(*g);
|
||||||
|
|
|
@ -239,6 +239,14 @@ static void tst12() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void tst13() {
|
||||||
|
environment env = mk_toplevel();
|
||||||
|
env.add_var("f", Type() >> Type());
|
||||||
|
expr f = Const("f");
|
||||||
|
std::cout << infer_type(f(Bool), env) << "\n";
|
||||||
|
std::cout << infer_type(f(Eq(True,False)), env) << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
tst1();
|
tst1();
|
||||||
tst2();
|
tst2();
|
||||||
|
@ -252,5 +260,6 @@ int main() {
|
||||||
tst10();
|
tst10();
|
||||||
tst11();
|
tst11();
|
||||||
tst12();
|
tst12();
|
||||||
|
tst13();
|
||||||
return has_violations() ? 1 : 0;
|
return has_violations() ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue