Skip to content

Commit

Permalink
run shorten_in_list_simplifier once at the end of the loop
Browse files Browse the repository at this point in the history
  • Loading branch information
erratic-pattern committed May 3, 2024
1 parent 259716c commit c6efe00
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,16 @@ impl<S: SimplifyInfo> ExprSimplifier<S> {
} = expr
.rewrite(&mut const_evaluator)?
.transform_data(|expr| expr.rewrite(&mut simplifier))?
.transform_data(|expr| expr.rewrite(&mut guarantee_rewriter))?
.transform_data(|expr| expr.rewrite(&mut shorten_in_list_simplifier))?;
.transform_data(|expr| expr.rewrite(&mut guarantee_rewriter))?;
expr = data;
num_iterations += 1;
if !transformed || num_iterations >= self.max_simplifier_iterations {
return Ok((expr, num_iterations));
break;
}
}
// shorten inlist should be started after other inlist rules are applied
expr = expr.rewrite(&mut shorten_in_list_simplifier).data()?;
return Ok((expr, num_iterations));
}

/// Apply type coercion to an [`Expr`] so that it can be
Expand Down

0 comments on commit c6efe00

Please sign in to comment.