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

25 lines
415 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
fun unreachable0() {
return
<!UNREACHABLE_CODE!>return todo()<!>
}
fun unreachable2() {
return
<!UNREACHABLE_CODE!>val a = todo()<!>
}
fun unreachable3() {
return
<!UNREACHABLE_CODE!>bar(todo())<!>
}
fun unreachable4(array: Array<Any>) {
return
<!UNREACHABLE_CODE!>array[todo()]<!>
}
fun bar(a: Any) {}
fun todo(): Nothing = throw Exception()