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

12 lines
230 B
Kotlin
Vendored

fun testIf() {
if (todo()) <!UNREACHABLE_CODE!>1<!> else <!UNREACHABLE_CODE!>2<!>
}
fun testIf1(b: Boolean) {
if (b) todo() else <!UNUSED_EXPRESSION!>1<!>
bar()
}
fun todo(): Nothing = throw Exception()
fun bar() {}