Files
kotlin-fork/compiler/testData/diagnostics/tests/functionAsExpression/DifficultInferenceForParameter.kt
T

9 lines
171 B
Kotlin
Vendored

// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
fun <T> foo(f : (T) -> T) : T = throw Exception()
fun test() {
val a : Int = foo(fun (x) = x)
}