11 lines
364 B
Kotlin
Vendored
11 lines
364 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
//KT-832 Provide better diagnostics when type inference fails for an expression that returns a function
|
|
package a
|
|
|
|
fun <T> fooT2() : (t : T) -> T {
|
|
return {it}
|
|
}
|
|
|
|
fun test() {
|
|
<!NI;NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>fooT2<!>()(1) // here 1 should not be marked with an error
|
|
} |