Merge pull request #10281 from igfoo/igfoo/extractFunctionReference

Kotlin: Remove cast in extractFunctionReference
This commit is contained in:
Ian Lynagh
2022-09-05 11:49:09 +01:00
committed by GitHub

View File

@@ -3845,7 +3845,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>