[FIR] Don't set lambda parameter type to Nothing by default
... when the expected type is not a function type. Instead set it to a new type variable. This fixes a bunch of false negative CANNOT_INFER_PARAMETER_TYPE. #KT-59882 Fixed
This commit is contained in:
committed by
Space Team
parent
9857bdc891
commit
c3c2f6f90a
@@ -112,6 +112,6 @@ fun testTwoLambdas() {
|
||||
fun f1(): (() -> Unit) -> (() -> Unit) -> Unit {
|
||||
return <!RETURN_TYPE_MISMATCH!>{ l1 ->
|
||||
l1()
|
||||
<!TOO_MANY_ARGUMENTS!>{ l2 -> <!UNRESOLVED_REFERENCE!>l2<!>() }<!>
|
||||
<!TOO_MANY_ARGUMENTS!>{ <!CANNOT_INFER_PARAMETER_TYPE!>l2<!> -> <!UNRESOLVED_REFERENCE!>l2<!>() }<!>
|
||||
}<!>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user