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: fix top definitions filtering #4873

Merged
merged 4 commits into from
Aug 31, 2022

Conversation

SirYwell
Copy link
Collaborator

With multiple independent interfaces declaring the same method, getTopDefinitions() returned wrong results.

The filtering was broken due to TypeAdaptor#isOverriding(m, m) == true and the wrong initialization of the method (as all methods were already added to the result).

@SirYwell SirYwell changed the title wip: fix: fix top definitions filtering review: fix: fix top definitions filtering Aug 29, 2022
@MartinWitt
Copy link
Collaborator

Do I understand that correct, that before we could only find a single top definition even if the method has multiple, and now we find all?

@SirYwell
Copy link
Collaborator Author

No, it returned all methods that were overridden, not just the top definitions. In my test case, it returned the methods from C, B, A1 and A2. Now it only returns the methods from A1 and A2, as in B and C, the method is only redefined. Basically, the whole loop at the bottom of getTopDefinitions() did not change the result anymore.

@MartinWitt MartinWitt changed the title review: fix: fix top definitions filtering fix: fix top definitions filtering Aug 31, 2022
@MartinWitt MartinWitt merged commit d4cc243 into INRIA:master Aug 31, 2022
@MartinWitt MartinWitt deleted the fix/topdefinitions branch August 31, 2022 10:56
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.

2 participants