diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt index 810b3e0d650..e9a7cf578a9 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt @@ -240,7 +240,9 @@ internal class FunctionInlining(val context: Context): IrElementTransformerVoid( val operandTypeDescriptor = newExpression.typeOperand.constructor.declarationDescriptor if (operandTypeDescriptor !is TypeParameterDescriptor) return newExpression // It is not TypeParameter - do nothing - val typeNew = typeArgsMap[operandTypeDescriptor]!! + var typeNew = typeArgsMap[operandTypeDescriptor]!! + if (newExpression.typeOperand.isMarkedNullable) + typeNew = typeNew.makeNullable() val startOffset = newExpression.startOffset val endOffset = newExpression.endOffset val operator = newExpression.operator