Kapt: Fix erasure() for executable types (KT-13629)
(cherry picked from commit 461c29d)
This commit is contained in:
committed by
Yan Zhulanow
parent
941d016cef
commit
9127788f4a
+12
-1
@@ -55,7 +55,18 @@ class JeMethodExecutableTypeMirror(
|
||||
return typeParameters.map { JeTypeVariableType(PsiTypesUtil.getClassType(it), it) }
|
||||
}
|
||||
|
||||
override fun toString() = (psi.containingClass?.qualifiedName?.let { it + "." } ?: "") + psi.name
|
||||
override fun toString() = buildString {
|
||||
val typeVariables = this@JeMethodExecutableTypeMirror.typeVariables
|
||||
if (typeVariables.isNotEmpty()) {
|
||||
append('<')
|
||||
typeVariables.joinTo(this, ",")
|
||||
append('>')
|
||||
}
|
||||
append('(')
|
||||
parameterTypes.joinTo(this, ",")
|
||||
append(')')
|
||||
append((this@JeMethodExecutableTypeMirror as ExecutableType).returnType)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
|
||||
+2
@@ -57,5 +57,7 @@ class JeTypeVariableType(
|
||||
return psiType == (other as? JeTypeVariableType)?.psiType
|
||||
}
|
||||
|
||||
override fun toString() = parameter.name ?: "<none>"
|
||||
|
||||
override fun hashCode() = psiType.hashCode()
|
||||
}
|
||||
Reference in New Issue
Block a user