mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Merge pull request #10247 from igfoo/igfoo/useSimpleType2
Kotlin: Remove another cast
This commit is contained in:
@@ -649,9 +649,9 @@ open class KotlinUsesExtractor(
|
|||||||
|
|
||||||
(s.isBoxedArray && s.arguments.isNotEmpty()) || s.isPrimitiveArray() -> {
|
(s.isBoxedArray && s.arguments.isNotEmpty()) || s.isPrimitiveArray() -> {
|
||||||
|
|
||||||
fun replaceComponentTypeWithAny(t: IrSimpleType, dimensions: Int): IrSimpleType =
|
fun replaceComponentTypeWithAny(t: IrSimpleType, dimensions: Int): IrType =
|
||||||
if (dimensions == 0)
|
if (dimensions == 0)
|
||||||
pluginContext.irBuiltIns.anyType as IrSimpleType
|
pluginContext.irBuiltIns.anyType
|
||||||
else
|
else
|
||||||
t.toBuilder().also { it.arguments = (it.arguments[0] as IrTypeProjection)
|
t.toBuilder().also { it.arguments = (it.arguments[0] as IrTypeProjection)
|
||||||
.let { oldArg ->
|
.let { oldArg ->
|
||||||
@@ -659,7 +659,7 @@ open class KotlinUsesExtractor(
|
|||||||
}
|
}
|
||||||
}.buildSimpleType()
|
}.buildSimpleType()
|
||||||
|
|
||||||
var componentType = s.getArrayElementType(pluginContext.irBuiltIns)
|
var componentType: IrType = s.getArrayElementType(pluginContext.irBuiltIns)
|
||||||
var isPrimitiveArray = false
|
var isPrimitiveArray = false
|
||||||
var dimensions = 0
|
var dimensions = 0
|
||||||
var elementType: IrType = s
|
var elementType: IrType = s
|
||||||
|
|||||||
Reference in New Issue
Block a user