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

Handle PsiImmediateClassType as PsiClassType to resolve bounds #2647

merged 1 commit into from Aug 30, 2022


Copy link

Fixes #2646

@@ -564,8 +564,6 @@ class DefaultPsiToDocumentableTranslator(

is PsiPrimitiveType -> if ( == "void") Void
else type.cacheBoundIfHasNoAnnotation { annotations -> PrimitiveJavaType(, annotations.annotations()) }
is PsiImmediateClassType ->
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure why it was done this way. Probably an exception was thrown and mapping PsiImmediateClassType -> JavaObject was added without researching. I found the PR where it was introduced and there was no additional context :(

PsiImmediateClassType and PsiClassReferenceType are both extending PsiClassType (resolve() is also part of the latter), so hopefully it's all good

@IgnatBeresnev IgnatBeresnev merged commit a4bccbf into master Aug 30, 2022
@IgnatBeresnev IgnatBeresnev deleted the 2646-resolve-java-enums branch August 30, 2022 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

Java Enums used in declaration are rendered as Any
2 participants