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

Fix Overrides for Subtypes matching #499

Closed
MateuszKubuszok opened this issue Apr 11, 2024 · 0 comments · Fixed by #504
Closed

Fix Overrides for Subtypes matching #499

MateuszKubuszok opened this issue Apr 11, 2024 · 0 comments · Fixed by #504
Labels
bug Erroneous behavior in existing features
Milestone

Comments

@MateuszKubuszok
Copy link
Member

I just figures out that I messed up in 1.0.0-M5:

  • withCoproductInstance[Subtype] matches on source type
  • .matching[Subtype] matches on target type
  • yet both are using the same Matching[Type] path segment when defining override
  • this could be fixed by
    • spliting Matching case into SourceMatching and TargetMatching
    • having overrides in SealeHierarchyToSealedHierarchy distinct which type is being matched
    • updating filterCurrentOverridesForSubtype(typeFilter: ?? => Boolean) to filter by both source and target type on respective fields

This is not super critical now - most of the time use cases would prevent any issues from happening - but it should be fixed before 1.0.0-RC1 since it requires a breaking change.

@MateuszKubuszok MateuszKubuszok added the bug Erroneous behavior in existing features label Apr 11, 2024
@MateuszKubuszok MateuszKubuszok added this to the 1.0.0-RC milestone Apr 11, 2024
@MateuszKubuszok MateuszKubuszok linked a pull request Apr 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Erroneous behavior in existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant