Fixed bug with type substitution for reified type parameter

This commit is contained in:
Igor Chevdar
2017-03-29 19:19:40 +03:00
parent 662abba4a7
commit dbea244b0e
@@ -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