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

Update java supertype processing #3997

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

juliamcclellan
Copy link
Contributor

The processing of supertypes for java source would convert PsiClassTypes to PsiClasses while creating AncestryNodes. This meant that the type parameters used for the supertypes were from the PsiClass definition instead of the PsiClassType usage like they should be.

For example, in the following java code:

class Bar<T> {}
public class Foo extends Bar<String> {}

The super class type of Foo should be Bar<String>. When processing the supertypes of Foo, the PsiClassType representing Bar<String> was converted to a PsiClass. The PsiClass reflects the definition of Bar, so Bar<T> became the super class type instead of Bar<String>.

Fixes: #3996

@juliamcclellan juliamcclellan marked this pull request as ready for review January 15, 2025 18:53
@whyoleg whyoleg requested a review from vmishenev January 16, 2025 14:28
@vmishenev vmishenev merged commit af87c48 into Kotlin:master Jan 29, 2025
7 checks passed
@vmishenev
Copy link
Contributor

Thank you for your contribution.

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.

Supertypes for java source use incorrect generics
2 participants