Kotlin: Remove cast in extractFunctionReference

This commit is contained in:
Ian Lynagh
2022-09-02 15:40:45 +01:00
parent 4f7eb7be83
commit a35c7ab5b3

View File

@@ -3829,7 +3829,11 @@ open class KotlinFileExtractor(
return
}
val parameterTypes = type.arguments.map { it as IrType }
val parameterTypes = type.arguments.map { it as? IrType }.requireNoNullsOrNull()
if (parameterTypes == null) {
logger.errorElement("Unexpected: Non-IrType parameter.", functionReferenceExpr)
return
}
val dispatchReceiverIdx: Int
val expressionTypeArguments: List<IrType>