Merge pull request #10192 from igfoo/igfoo/array

Kotlin: Remove another cast
This commit is contained in:
Ian Lynagh
2022-08-30 11:51:48 +01:00
committed by GitHub

View File

@@ -1458,13 +1458,13 @@ open class KotlinUsesExtractor(
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 (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())
t.addAnnotations(listOf(RawTypeAnnotation.annotationConstructor))
else