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 allSuperclassesDo: #851

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

Gabriel-Darbord
Copy link
Member

@Gabriel-Darbord Gabriel-Darbord commented Oct 30, 2024

The inheritance chain is broken by parametric entities, this is just a temporary fix for this deeper issue.
Parametrics still need an overhaul.

The inheritance chain is broken by parametric entities, this is just a temporary fix for this deeper issue
@Gabriel-Darbord
Copy link
Member Author

Gabriel-Darbord commented Oct 30, 2024

I think the failed tests here illustrate some of the problems we have with the current state of parametrics, and why I wanted to change this method.

Metamodels that use parametrics require extra logic to get back to the original behavior before the change.
Now we have to work around the new association between a class and its generic superclass: FamixTConcretization.

Metamodels that do not use parametrics cannot use the extra logic because they do not use the trait, so there is no testing method for it: isParametricEntity.

I think this breaks the agnosticity we want to have in Famix traits, and my proposed fix is not ideal (or even good).
But similar changes have already been made, and we had to add isParametricEntity to FamixStEntity as a workaround (you can see that the method does not have the generated pragma).

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.

1 participant