Files
kotlin-fork/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInInvokeCall.fir.kt
T
Andrey Zinovyev ec4cbfef59 [FIR] UNREACHABLE_CODE diagnostic (wip)
Implementation for PSI only
2021-08-04 14:42:24 +03:00

12 lines
281 B
Kotlin
Vendored

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