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

14 lines
342 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
fun testArgumentInCall() {
fun bar(i: Int, s: String, x: Any) {}
<!UNREACHABLE_CODE!>bar(<!>1, todo(), <!UNREACHABLE_CODE!>"")<!>
}
fun testArgumentInVariableAsFunctionCall(f: (Any) -> Unit) {
<!UNREACHABLE_CODE!>f(<!>todo()<!UNREACHABLE_CODE!>)<!>
}
fun todo(): Nothing = throw Exception()