Skip to content

Commit c30f39d

Browse files
authored
Merge pull request #10247 from igfoo/igfoo/useSimpleType2
Kotlin: Remove another cast
2 parents 8ff0a19 + e4ff250 commit c30f39d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,17 +649,17 @@ open class KotlinUsesExtractor(
649649

650650
(s.isBoxedArray && s.arguments.isNotEmpty()) || s.isPrimitiveArray() -> {
651651

652-
fun replaceComponentTypeWithAny(t: IrSimpleType, dimensions: Int): IrSimpleType =
652+
fun replaceComponentTypeWithAny(t: IrSimpleType, dimensions: Int): IrType =
653653
if (dimensions == 0)
654-
pluginContext.irBuiltIns.anyType as IrSimpleType
654+
pluginContext.irBuiltIns.anyType
655655
else
656656
t.toBuilder().also { it.arguments = (it.arguments[0] as IrTypeProjection)
657657
.let { oldArg ->
658658
listOf(makeTypeProjection(replaceComponentTypeWithAny(oldArg.type as IrSimpleType, dimensions - 1), oldArg.variance))
659659
}
660660
}.buildSimpleType()
661661

662-
var componentType = s.getArrayElementType(pluginContext.irBuiltIns)
662+
var componentType: IrType = s.getArrayElementType(pluginContext.irBuiltIns)
663663
var isPrimitiveArray = false
664664
var dimensions = 0
665665
var elementType: IrType = s

0 commit comments

Comments
 (0)