c3c2f6f90a
... 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
8 lines
250 B
Kotlin
Vendored
8 lines
250 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
package f
|
|
|
|
fun <R> h(i: Int, a: Any, r: R, f: (Boolean) -> Int) = 1
|
|
fun <R> h(a: Any, i: Int, r: R, f: (Boolean) -> Int) = 1
|
|
|
|
fun test() = <!OVERLOAD_RESOLUTION_AMBIGUITY!>h<!>(1, 1, 1, { <!CANNOT_INFER_PARAMETER_TYPE!>b<!> -> 42 })
|