Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/ea72837.kt
T
Mikhail Zarechenskiy 2cac6a9e7d Improve inference on generics for callable references
#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
2017-01-24 02:15:26 +03:00

10 lines
241 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
fun <T> g(x: T) = 1
fun h(x: () -> Unit) = 1
fun foo() {
<!UNRESOLVED_REFERENCE!>f<!>(::<!SYNTAX!><!>)
<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>g<!>(::<!SYNTAX!><!>)
h(::<!SYNTAX!><!>)
}