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

review: fix: Correctly adapt type parameters inherited from enclosing classes #5228

Merged
merged 7 commits into from May 25, 2023

Conversation

I-Al-Istannen
Copy link
Collaborator

@I-Al-Istannen I-Al-Istannen commented May 23, 2023

description

Type adaption did not handle using generics inherited from enclosing classes. In these cases, a type hierarchy from the innermost class to its parent class was built, causing the generic resolution to fail.

This PR fixes this by adjusting building a hierarchy between the declaring types instead.

todo

  • Implement the fix
  • Document the changes in docs/type_adaption.md
  • Maybe remove the code duplication in the type adaptor for resolving formal type declarers

closes

This closes #5226.

@I-Al-Istannen I-Al-Istannen marked this pull request as ready for review May 23, 2023 22:28
@I-Al-Istannen I-Al-Istannen changed the title wip: fix: Simplify declaration node glue dispatch review: fix: Simplify declaration node glue dispatch May 24, 2023
@I-Al-Istannen I-Al-Istannen changed the title review: fix: Simplify declaration node glue dispatch review: fix: Correctly adapt type parameters inherited from enclosing classes May 24, 2023
doc/type_adaption.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@SirYwell SirYwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks plausible from my understanding

@SirYwell SirYwell merged commit ed9f632 into INRIA:master May 25, 2023
11 checks passed
@monperrus
Copy link
Collaborator

thanks @I-Al-Istannen

@I-Al-Istannen I-Al-Istannen deleted the fix/issue-5226 branch May 27, 2023 09:33
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.

[Bug]: Generic methods using isoverride method will throw an exception
3 participants