Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fpoli authored Mar 25, 2024
1 parent 9eb4046 commit 4fe87e0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions vir/defs/polymorphic/ast/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,7 @@ impl Expr {
/// Encode Rust's division. This is *not* Viper's division.
pub fn div(left: Expr, right: Expr) -> Self {
Expr::ite(
Expr::or(
Expr::ge_cmp(left.clone(), 0.into()),
Expr::eq_cmp(Expr::modulo(left.clone(), right.clone()), 0.into()),
),
Expr::ge_cmp(left.clone(), 0.into()),
// positive value or left % right == 0
Expr::unsigned_div(left.clone(), right.clone()),
// negative value
Expand Down

0 comments on commit 4fe87e0

Please sign in to comment.