Files
kotlin/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInLoops.fir.kt

21 lines
265 B
Kotlin
Vendored

fun testFor() {
operator fun Nothing.iterator() = (0..1).iterator()
for (i in todo()) {}
}
fun testWhile() {
while (todo()) {
}
}
fun testDoWhile() {
do {
} while(todo())
bar()
}
fun todo(): Nothing = throw Exception()
fun bar() {}