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?' // upcast to 'String?'
return irImplicitCast(expression, context.irBuiltIns.stringType.makeNullable()) 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()) { if (upperBound.isByte() || upperBound.isShort()) {
// Expression type is not null, // Expression type is not null,
// T <: Byte || T <: Short => // T <: Byte || T <: Short =>
@@ -1,8 +1,6 @@
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition // !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// WITH_REFLECT // WITH_REFLECT
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
// KT-51458:
// IGNORE_BACKEND_FIR: JVM_IR
annotation class AnnoUB(val ub: UByteArray) annotation class AnnoUB(val ub: UByteArray)
annotation class AnnoUS(val us: UShortArray) annotation class AnnoUS(val us: UShortArray)
@@ -1,8 +1,6 @@
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition // !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// WITH_REFLECT // WITH_REFLECT
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
// KT-51458:
// IGNORE_BACKEND_FIR: JVM_IR
// TODO: it's not clear why compilation fails for Android // TODO: it's not clear why compilation fails for Android
// IGNORE_BACKEND: ANDROID // IGNORE_BACKEND: ANDROID