Skip to content

Commit a35c7ab

Browse files
committed
Kotlin: Remove cast in extractFunctionReference
1 parent 4f7eb7b commit a35c7ab

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3829,7 +3829,11 @@ open class KotlinFileExtractor(
38293829
return
38303830
}
38313831

3832-
val parameterTypes = type.arguments.map { it as IrType }
3832+
val parameterTypes = type.arguments.map { it as? IrType }.requireNoNullsOrNull()
3833+
if (parameterTypes == null) {
3834+
logger.errorElement("Unexpected: Non-IrType parameter.", functionReferenceExpr)
3835+
return
3836+
}
38333837

38343838
val dispatchReceiverIdx: Int
38353839
val expressionTypeArguments: List<IrType>

0 commit comments

Comments
 (0)