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
merged 1 commit into from
Aug 30, 2022

Conversation

IgnatBeresnev
Copy link
Member

Fixes #2646

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

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

@IgnatBeresnev IgnatBeresnev Aug 29, 2022

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Java Enums used in declaration are rendered as Any
2 participants