Skip to content

Commit f118b39

Browse files
authored
Merge pull request #10192 from igfoo/igfoo/array
Kotlin: Remove another cast
2 parents a5893f3 + d2a5281 commit f118b39

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,13 +1458,13 @@ open class KotlinUsesExtractor(
14581458
return eraseTypeParameter(owner)
14591459
}
14601460

1461-
if (t.isArray() || t.isNullableArray()) {
1462-
val elementType = t.getArrayElementType(pluginContext.irBuiltIns)
1463-
val erasedElementType = erase(elementType)
1464-
return (classifier as IrClassSymbol).typeWith(erasedElementType).codeQlWithHasQuestionMark(t.hasQuestionMark)
1465-
}
1466-
14671461
if (owner is IrClass) {
1462+
if (t.isArray() || t.isNullableArray()) {
1463+
val elementType = t.getArrayElementType(pluginContext.irBuiltIns)
1464+
val erasedElementType = erase(elementType)
1465+
return owner.typeWith(erasedElementType).codeQlWithHasQuestionMark(t.hasQuestionMark)
1466+
}
1467+
14681468
return if (t.arguments.isNotEmpty())
14691469
t.addAnnotations(listOf(RawTypeAnnotation.annotationConstructor))
14701470
else

0 commit comments

Comments
 (0)