New J2K: Fix accessing to non-existing psi in TypeMappingConversion
This commit is contained in:
committed by
Ilya Kirillov
parent
17f86d69a7
commit
a19ae4bcc2
@@ -55,13 +55,12 @@ class TypeMappingConversion(val context: ConversionContext) : RecursiveApplicabl
|
|||||||
private fun mapType(type: JKType, element: JKTreeElement): JKType = when (type) {
|
private fun mapType(type: JKType, element: JKTreeElement): JKType = when (type) {
|
||||||
is JKJavaPrimitiveType -> mapPrimitiveType(type)
|
is JKJavaPrimitiveType -> mapPrimitiveType(type)
|
||||||
is JKClassType -> mapClassType(type, element)
|
is JKClassType -> mapClassType(type, element)
|
||||||
is JKJavaVoidType -> JKClassTypeImpl(
|
is JKJavaVoidType ->
|
||||||
context.symbolProvider.provideByFqName(
|
kotlinTypeByName(
|
||||||
ClassId.topLevel(KotlinBuiltIns.FQ_NAMES.unit.toSafe()),
|
KotlinBuiltIns.FQ_NAMES.unit.toSafe().asString(),
|
||||||
element.parentOfType<JKClass>()!!.psi!!
|
context.symbolProvider,
|
||||||
),
|
Nullability.NotNull
|
||||||
nullability = Nullability.NotNull
|
)
|
||||||
)
|
|
||||||
is JKJavaArrayType -> JKClassTypeImpl(
|
is JKJavaArrayType -> JKClassTypeImpl(
|
||||||
context.symbolProvider.provideByFqName(arrayFqName(type.type)),
|
context.symbolProvider.provideByFqName(arrayFqName(type.type)),
|
||||||
if (type.type is JKJavaPrimitiveType) emptyList() else listOf(mapType(type.type, element)),
|
if (type.type is JKJavaPrimitiveType) emptyList() else listOf(mapType(type.type, element)),
|
||||||
|
|||||||
Reference in New Issue
Block a user