Make type parameter nullable as it should be
This change is needed, because in NI we perform a more strict check
This commit is contained in:
@@ -85,7 +85,7 @@ open class InliningContext(
|
||||
|
||||
fun subInlineWithClassRegeneration(
|
||||
generator: NameGenerator,
|
||||
newTypeMappings: MutableMap<String, String>,
|
||||
newTypeMappings: MutableMap<String, String?>,
|
||||
callSiteInfo: InlineCallSiteInfo
|
||||
): InliningContext = RegeneratedClassContext(
|
||||
this, expressionMap, state, generator, TypeRemapper.createFrom(typeRemapper, newTypeMappings),
|
||||
|
||||
@@ -53,7 +53,7 @@ class MethodInliner(
|
||||
//keeps order
|
||||
private val transformations = ArrayList<TransformationInfo>()
|
||||
//current state
|
||||
private val currentTypeMapping = HashMap<String, String>()
|
||||
private val currentTypeMapping = HashMap<String, String?>()
|
||||
private val result = InlineResult.create()
|
||||
private var lambdasFinallyBlocks: Int = 0
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class TypeParameter(val oldName: String, val newName: String?, val isReified: Bo
|
||||
|
||||
//typeMapping data could be changed outside through method processing
|
||||
class TypeRemapper private constructor(
|
||||
private val typeMapping: MutableMap<String, String>,
|
||||
private val typeMapping: MutableMap<String, String?>,
|
||||
val parent: TypeRemapper? = null,
|
||||
private val isRootInlineLambda: Boolean = false
|
||||
) {
|
||||
@@ -65,7 +65,7 @@ class TypeRemapper private constructor(
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun createRoot(formalTypeParameters: TypeParameterMappings?): TypeRemapper {
|
||||
return TypeRemapper(HashMap<String, String>()).apply {
|
||||
return TypeRemapper(HashMap<String, String?>()).apply {
|
||||
formalTypeParameters?.forEach {
|
||||
registerTypeParameter(it)
|
||||
}
|
||||
@@ -73,7 +73,7 @@ class TypeRemapper private constructor(
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun createFrom(mappings: MutableMap<String, String>): TypeRemapper {
|
||||
fun createFrom(mappings: MutableMap<String, String?>): TypeRemapper {
|
||||
return TypeRemapper(mappings)
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ class TypeRemapper private constructor(
|
||||
return TypeRemapper(createNewAndMerge(parentRemapper, mappings), parentRemapper, isRootInlineLambda)
|
||||
}
|
||||
|
||||
private fun createNewAndMerge(remapper: TypeRemapper, additionalTypeMappings: Map<String, String?>): MutableMap<String, String> {
|
||||
private fun createNewAndMerge(remapper: TypeRemapper, additionalTypeMappings: Map<String, String?>): MutableMap<String, String?> {
|
||||
return HashMap(remapper.typeMapping).apply {
|
||||
this += additionalTypeMappings
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user