diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt index db25b2b84a7..2eb564c2695 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt @@ -1459,13 +1459,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