mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Merge pull request #10282 from igfoo/igfoo/extendsAdditionAllowed
Kotlin: Remove a cast in extendsAdditionAllowed
This commit is contained in:
@@ -921,10 +921,17 @@ open class KotlinUsesExtractor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun extendsAdditionAllowed(t: IrType) =
|
private fun extendsAdditionAllowed(t: IrType) =
|
||||||
if (t.isBoxedArray)
|
if (t.isBoxedArray) {
|
||||||
arrayExtendsAdditionAllowed(t as IrSimpleType)
|
if (t is IrSimpleType) {
|
||||||
else
|
arrayExtendsAdditionAllowed(t)
|
||||||
|
} else {
|
||||||
|
logger.warn("Boxed array of unexpected kind ${t.javaClass}")
|
||||||
|
// Return false, for no particular reason
|
||||||
|
false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
((t as? IrSimpleType)?.classOrNull?.owner?.isFinalClass) != true
|
((t as? IrSimpleType)?.classOrNull?.owner?.isFinalClass) != true
|
||||||
|
}
|
||||||
|
|
||||||
private fun wildcardAdditionAllowed(v: Variance, t: IrType, addByDefault: Boolean) =
|
private fun wildcardAdditionAllowed(v: Variance, t: IrType, addByDefault: Boolean) =
|
||||||
when {
|
when {
|
||||||
|
|||||||
Reference in New Issue
Block a user