Files
kotlin/compiler/testData/diagnostics/tests/functionAsExpression/DifficultInferenceForParameter.kt
2015-05-20 09:24:56 +03:00

8 lines
154 B
Kotlin
Vendored

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