Skip to content

Commit

Permalink
Fix: Resolve being unable to get the descriptor for some complex types.
Browse files Browse the repository at this point in the history
  • Loading branch information
LlamaLad7 committed Jul 2, 2024
1 parent 3ecde2d commit d8a9f83
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/kotlin/util/bytecode-utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ fun getPrimitiveType(internalName: Char): PsiPrimitiveType? {
}

val PsiType.descriptor
get() = appendDescriptor(StringBuilder()).toString()
get() = erasure().appendDescriptor(StringBuilder()).toString()

private fun PsiType.erasure() = TypeConversionUtil.erasure(this)!!

fun getPrimitiveWrapperClass(internalName: Char, project: Project): PsiClass? {
val type = getPrimitiveType(internalName) ?: return null
Expand Down

0 comments on commit d8a9f83

Please sign in to comment.