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

Fixed invariants leak between related classes #297

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

mristin
Copy link
Collaborator

@mristin mristin commented Sep 20, 2024

With pull request #292, we allowed users to specify the events which trigger the invariant checks for each individual invariant.

This introduced a bug where invariants added to a child class were also added to a parent class.

In this patch, we fixed the issue.

Fixes #295.

@mristin mristin force-pushed the mristin/Fix-deeper-inheritance-after-2.7.0 branch from a6fc5ae to 796b241 Compare September 20, 2024 07:26
With pull request #292, we allowed users to specify the events which
trigger the invariant checks for each individual invariant.

This introduced a bug where invariants added to a child class were also
added to a parent class.

In this patch, we fixed the issue.

Fixes #295.
@mristin mristin force-pushed the mristin/Fix-deeper-inheritance-after-2.7.0 branch from 796b241 to 9c15d7e Compare September 20, 2024 07:27
@coveralls
Copy link

coveralls commented Sep 20, 2024

Coverage Status

coverage: 92.938% (+0.009%) from 92.929%
when pulling 9c15d7e on mristin/Fix-deeper-inheritance-after-2.7.0
into 577b503 on master.

@mristin
Copy link
Collaborator Author

mristin commented Sep 20, 2024

@verinov would you mind to take a look at this PR? Is it maybe possible to run this Git revision against your own code and test it in order to make sure this patch really fixes the issue & doesn't introduce any other bugs?

edit: minor clarification

@verinov
Copy link

verinov commented Sep 20, 2024

@mristin I ran this branch with my code and everything looks good. Thank you!
Looking forward to the new release.

@mristin mristin merged commit b9b66fe into master Sep 21, 2024
12 checks passed
@mristin mristin deleted the mristin/Fix-deeper-inheritance-after-2.7.0 branch September 21, 2024 05:43
mristin added a commit that referenced this pull request Sep 21, 2024
* Fixed invariants leak between related classes (#297)

This is a critical bugfix patch version. We introduced a bug in
2.7.0 (#292) where invariants defined on derived classes leaked up
to parent classes. This bug is fixed in this version.
@mristin mristin mentioned this pull request Sep 21, 2024
mristin added a commit that referenced this pull request Sep 21, 2024
* Fixed invariants leak between related classes (#297)

This is a critical bugfix patch version. We introduced a bug in
2.7.0 (#292) where invariants defined on derived classes leaked up
to parent classes. This bug is fixed in this version.
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.

Invariant of a subclass applies to its base
3 participants