fix(kernel/default_converter): discard constraints when optimization fails
This commit is contained in:
parent
f6a1d1c864
commit
45c8cdc626
1 changed files with 5 additions and 2 deletions
|
@ -486,10 +486,13 @@ pair<bool, constraint_seq> default_converter::is_def_eq_core(expr const & t, exp
|
|||
// If they are, then t_n and s_n must be definitionally equal, and we can
|
||||
// skip the delta-reduction step.
|
||||
// If the flag use_conv_opt() is not true, then we skip this optimization
|
||||
constraint_seq tmp_cs;
|
||||
if (!is_opaque(*d_t) && d_t->use_conv_opt() &&
|
||||
is_def_eq(const_levels(get_app_fn(t_n)), const_levels(get_app_fn(s_n)), cs) &&
|
||||
is_def_eq_args(t_n, s_n, cs))
|
||||
is_def_eq(const_levels(get_app_fn(t_n)), const_levels(get_app_fn(s_n)), tmp_cs) &&
|
||||
is_def_eq_args(t_n, s_n, tmp_cs)) {
|
||||
cs += tmp_cs;
|
||||
return to_bcs(true, cs);
|
||||
}
|
||||
}
|
||||
}
|
||||
t_n = whnf_core(unfold_names(t_n, d_t->get_weight() - 1));
|
||||
|
|
Loading…
Reference in a new issue