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

Skip to content

Conversation

@IgnatBeresnev
Copy link
Contributor

Fixes #2646


is PsiPrimitiveType -> if (type.name == "void") Void
else type.cacheBoundIfHasNoAnnotation { annotations -> PrimitiveJavaType(type.name, annotations.annotations()) }
is PsiImmediateClassType ->
Copy link
Contributor 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

3 participants