New J2K: do not convert Java string type to a Kotlin one because of wrong constructor calls
This commit is contained in:
@@ -141,9 +141,11 @@ class TypeMappingConversion(val context: NewJ2kConverterContext) : RecursiveAppl
|
||||
}
|
||||
|
||||
private fun JKClassSymbol.kotlinStandardType(): String? =
|
||||
fqName?.let {
|
||||
fqName.takeIf {
|
||||
it !in ignoredJavaFqNames
|
||||
}?.let {
|
||||
JavaToKotlinClassMap.mapJavaToKotlin(FqName(it))?.asString()
|
||||
}
|
||||
} ?: fqName
|
||||
|
||||
private fun JKJavaPrimitiveType.mapPrimitiveType(): JKClassType {
|
||||
val fqName = jvmPrimitiveType.primitiveType.typeFqName
|
||||
@@ -162,4 +164,10 @@ class TypeMappingConversion(val context: NewJ2kConverterContext) : RecursiveAppl
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
val ignoredJavaFqNames = setOf(
|
||||
"java.lang.String"
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user