diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt index 6de4b659cb6..d43acea7dbb 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt @@ -649,9 +649,9 @@ open class KotlinUsesExtractor( (s.isBoxedArray && s.arguments.isNotEmpty()) || s.isPrimitiveArray() -> { - fun replaceComponentTypeWithAny(t: IrSimpleType, dimensions: Int): IrSimpleType = + fun replaceComponentTypeWithAny(t: IrSimpleType, dimensions: Int): IrType = if (dimensions == 0) - pluginContext.irBuiltIns.anyType as IrSimpleType + pluginContext.irBuiltIns.anyType else t.toBuilder().also { it.arguments = (it.arguments[0] as IrTypeProjection) .let { oldArg ->