KT-16666 IMPLICIT_INTEGER_COERCION expression should have non-nullable type

This commit is contained in:
Dmitry Petrov
2017-03-06 16:17:59 +03:00
parent 8c32719f3d
commit e4683a1e9f
2 changed files with 4 additions and 4 deletions
@@ -184,7 +184,7 @@ class InsertImplicitCasts(val builtIns: KotlinBuiltIns): IrElementTransformerVoi
KotlinTypeChecker.DEFAULT.isSubtypeOf(valueType.makeNotNullable(), expectedType) ->
this
KotlinBuiltIns.isInt(valueType) && notNullableExpectedType.isBuiltInIntegerType() ->
IrTypeOperatorCallImpl(startOffset, endOffset, expectedType,
IrTypeOperatorCallImpl(startOffset, endOffset, notNullableExpectedType,
IrTypeOperator.IMPLICIT_INTEGER_COERCION, notNullableExpectedType, this)
else ->
IrTypeOperatorCallImpl(startOffset, endOffset, expectedType,