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

invariant statement executed twice when false #152

Open
ThijsBroersen opened this issue Jul 28, 2014 · 3 comments
Open

invariant statement executed twice when false #152

ThijsBroersen opened this issue Jul 28, 2014 · 3 comments

Comments

@ThijsBroersen
Copy link

Hi Flavio,

I found out that when an invariant statement outputs false it is immediately executed again before throwing the InvariantViolationException. Is this correct?

Kind regards,
Thijs

@fwbrasil
Copy link
Owner

This is the expected behavior, since the validation is done in more than one phase. Is it affecting your application's behavior?

@ThijsBroersen
Copy link
Author

Thanks for the reply!
It is not affecting my application's behavior too much, but I noticed it in my debug-logging and I do not see the logic: each executing gives the same result so why is there more than one validation phase?

@fwbrasil
Copy link
Owner

Yeah, there is space for optimizations for the invariants. Lets keep this issue open to review the invariant validation phases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants