JVM IR: get rid of toIrBasedKotlinType in MethodSignatureMapper

Commonize (in terms of TypeSystemCommonBackendContext implementations
for KotlinType/IrType) code that computes optimal TypeMappingMode to
apply to different positions where inline class types can be present.
This commit is contained in:
Alexander Udalov
2021-03-31 19:30:30 +02:00
parent b59ac5d8f6
commit ce0c0ad2e3
7 changed files with 37 additions and 45 deletions
@@ -218,7 +218,7 @@ class KotlinTypeMapper @JvmOverloads constructor(
return mapType(returnType, sw, typeMappingModeFromAnnotation)
}
val mappingMode = TypeMappingMode.getOptimalModeForReturnType(returnType, isAnnotationMethod)
val mappingMode = typeSystem.getOptimalModeForReturnType(returnType, isAnnotationMethod)
return mapType(returnType, sw, mappingMode)
}
@@ -1084,7 +1084,7 @@ class KotlinTypeMapper @JvmOverloads constructor(
?: if (callableDescriptor.isMethodWithDeclarationSiteWildcards && type.arguments.isNotEmpty()) {
TypeMappingMode.GENERIC_ARGUMENT // Render all wildcards
} else {
TypeMappingMode.getOptimalModeForValueParameter(type)
typeSystem.getOptimalModeForValueParameter(type)
}
mapType(type, sw, typeMappingMode)