JVM_IR KT-51458 fix DNN types handling in JvmStringConcatenationLowering

This commit is contained in:
Dmitry Petrov
2022-02-24 18:44:08 +03:00
parent f1f2c7cce5
commit a1db077af9
3 changed files with 1 additions and 5 deletions
@@ -80,7 +80,7 @@ private fun JvmIrBuilder.normalizeArgument(expression: IrExpression): IrExpressi
// upcast to 'String?'
return irImplicitCast(expression, context.irBuiltIns.stringType.makeNullable())
}
if (!(type as IrSimpleType).hasQuestionMark) {
if (type is IrSimpleType && !type.hasQuestionMark || type is IrDefinitelyNotNullType) {
if (upperBound.isByte() || upperBound.isShort()) {
// Expression type is not null,
// T <: Byte || T <: Short =>