2cac6a9e7d
#KT-10711 Fixed #KT-12802 Fixed #KT-12964 Fixed #KT-15439 Fixed Analyze callable references in `dependent` mode, then complete them with respect to expected types
10 lines
280 B
Kotlin
Vendored
10 lines
280 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
|
|
fun <T, R> apply(x: T, f: (T) -> R): R = f(x)
|
|
|
|
fun foo(i: Int) {}
|
|
fun foo(s: String) {}
|
|
|
|
val x1 = apply(1, ::foo)
|
|
val x2 = apply("hello", ::foo)
|
|
val x3 = <!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>apply<!>(true, ::<!NONE_APPLICABLE!>foo<!>) |