-
Notifications
You must be signed in to change notification settings - Fork 89
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
Multiple contracts on a record not working as intended #2041
Comments
Thanks for the report. I can reproduce on 1.8.0, and the Given the fact that adding a field to either record fixes the issue, I'm highly suspecting that the contract deduplication optimization isn't sound and consider the two contracts to be equivalent for some reasons, thus eliding the second one. |
(Note: first bad commit is 2a727ba, which does touch the record contract equality code to ignore pending contracts) |
Describe the bug
Typically, the following code would apply multiple contracts on a value and if value is a negative number it would fail on the second part of the contract.
However, this is not the case when applying multiple record contracts and both have the same set of fields. The snippet below should have failed when evaluating
container
but it doesn't. Based on my testing, this only happens when both inner and outer have the same of fields and adding an additional field to either contracts would give the expected behavior.Expected behavior
{} | contract1 | contract2
should work when both contracts run checks against the same set of fields.Environment
The text was updated successfully, but these errors were encountered: