Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/regressions/kt2445.kt
T
Svetlana Isakova 79cec6411d Mark only unreachable parts of element if it has reachable parts
like for 'return todo()' mark only 'return'
2014-06-21 12:26:33 +04:00

11 lines
299 B
Kotlin

// !DIAGNOSTICS: -UNREACHABLE_CODE
//KT-2445 Calling method with function with generic parameter causes compile-time exception
package a
fun main(args: Array<String>) {
<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>test<!> {
}
}
fun test<R>(callback: (R) -> Unit):Unit = callback(null!!)