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

Clarify documentation of postcondition capture #1239

Closed
jamadagni opened this issue Aug 19, 2024 · 0 comments
Closed

Clarify documentation of postcondition capture #1239

jamadagni opened this issue Aug 19, 2024 · 0 comments

Comments

@jamadagni
Copy link
Contributor

- **Preconditions and postconditions.** A function declaration can include `pre(condition)` and `post(condition)` before the `= /* function body */`. Before entering the function body, preconditions are fully evaluated and postconditions are captured (and performs their captures, if any). Immediately before exiting the function body via a normal return, postconditions are evaluated. If the function exits via an exception, postconditions are not evaluated.

Before entering the function body, … and postconditions are captured (and performs their captures, if any)

Can this wording please be clarified a bit more?

The part in the () is clear enough, as it is about the values which need to be captured before entering the function body, but the other usage of the word “postconditions are captured” seems to indicate that there are two kinds of capture going on. What is it?

(I could as this as a discussion Q&A but I feel the documentation should be clarified hence filing as issue.)

Thanks!

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

No branches or pull requests

1 participant