Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an issue with loops #65

Merged
merged 5 commits into from
Jan 25, 2024
Merged

Fix an issue with loops #65

merged 5 commits into from
Jan 25, 2024

Conversation

sonmarcho
Copy link
Member

The following example caused a crash:

pub struct BigInt<const N: usize>(pub [u64; N]);

impl<const N : usize> BigInt<N> {
  pub fn const_geq(&self, other: &Self) -> bool {
      let mut i = 0;
      while i < N {
          let a = self.0[i];
          i += 1;
      }
      false
  }
}

The reason is that when reorganizing the environment upon reaching the continue statement, we did not move some value to an anonymous value, while in the fixed-point environment this value was bottom. The matcher then failed upon matching those two environments.

@sonmarcho sonmarcho merged commit 202f015 into main Jan 25, 2024
4 checks passed
@sonmarcho sonmarcho deleted the son/fix_loops branch January 25, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant