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

Raise an error if old() expressions are used in local vars outside of loops #1482

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

zgrannan
Copy link
Collaborator

If an expression old(E) is used within an assert statement, and E contains a local variable, then the fold-unfold algorithm will raise an error. This PR changes Prusti to detect such patterns and present a user-friendly error instead.

@zgrannan zgrannan merged commit 260594b into viperproject:master Dec 20, 2023
19 checks passed
@zgrannan zgrannan deleted the no-local-in-old branch December 20, 2023 19:36
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