Kotlin: Remove another cast

This commit is contained in:
Ian Lynagh
2022-08-26 15:59:26 +01:00
parent b0ae12850d
commit d2a5281d94

View File

@@ -1459,13 +1459,13 @@ open class KotlinUsesExtractor(
return eraseTypeParameter(owner) return eraseTypeParameter(owner)
} }
if (t.isArray() || t.isNullableArray()) {
val elementType = t.getArrayElementType(pluginContext.irBuiltIns)
val erasedElementType = erase(elementType)
return (classifier as IrClassSymbol).typeWith(erasedElementType).codeQlWithHasQuestionMark(t.hasQuestionMark)
}
if (owner is IrClass) { if (owner is IrClass) {
if (t.isArray() || t.isNullableArray()) {
val elementType = t.getArrayElementType(pluginContext.irBuiltIns)
val erasedElementType = erase(elementType)
return owner.typeWith(erasedElementType).codeQlWithHasQuestionMark(t.hasQuestionMark)
}
return if (t.arguments.isNotEmpty()) return if (t.arguments.isNotEmpty())
t.addAnnotations(listOf(RawTypeAnnotation.annotationConstructor)) t.addAnnotations(listOf(RawTypeAnnotation.annotationConstructor))
else else