mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
Kotlin: Remove a cast from extractPropertyReference
This commit is contained in:
@@ -3678,6 +3678,11 @@ open class KotlinFileExtractor(
|
||||
logger.errorElement("Cannot find class for kPropertyType. ${kPropertyType.classFqName?.asString()}", propertyReferenceExpr)
|
||||
return
|
||||
}
|
||||
val parameterTypes = kPropertyType.arguments.map { it as? IrType }.requireNoNullsOrNull()
|
||||
if (parameterTypes == null) {
|
||||
logger.errorElement("Unexpected: Non-IrType parameter.", propertyReferenceExpr)
|
||||
return
|
||||
}
|
||||
|
||||
val locId = tw.getLocation(propertyReferenceExpr)
|
||||
|
||||
@@ -3698,7 +3703,6 @@ open class KotlinFileExtractor(
|
||||
val classId = extractGeneratedClass(ids, listOf(baseClass, kPropertyType), locId, currentDeclaration)
|
||||
|
||||
val helper = PropertyReferenceHelper(propertyReferenceExpr, locId, ids)
|
||||
val parameterTypes = kPropertyType.arguments.map { it as IrType }
|
||||
|
||||
helper.extractReceiverField()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user