Files
kotlin/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInInvokeCall.kt
2015-10-12 13:30:16 +03:00

11 lines
294 B
Kotlin
Vendored

fun testInvoke() {
operator fun Nothing.invoke() = this
todo()<!UNREACHABLE_CODE!>()<!>
}
fun testInvokeWithLambda() {
operator fun Nothing.invoke(<!UNUSED_PARAMETER!>i<!>: Int, f: () -> Int) = f
todo()<!UNREACHABLE_CODE!>(1){ 42 }<!>
}
fun todo(): Nothing = throw Exception()