Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/regressions/kt832.kt
T
2012-08-06 18:18:26 +04:00

10 lines
290 B
Kotlin

//KT-832 Provide better diagnostics when type inference fails for an expression that returns a function
package a
fun fooT2<T>() : (t : T) -> T {
return {it}
}
fun test() {
<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>fooT2<!>()(1) // here 1 should not be marked with an error
}