Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/generic/kt10968.fir.kt
T

12 lines
244 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_VARIABLE
// KT-10968 Callable reference: type inference by function return type
fun <T> getT(): T = null!!
fun getString() = ""
fun test() {
val a : () -> String = ::getString
val b : () -> String = ::getT
}