mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
Kotlin: Remove another cast
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user