Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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