Files
kotlin-fork/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Throw.kt
T
2013-12-11 19:53:50 +04:00

9 lines
266 B
Kotlin

fun bar(x: Int): RuntimeException = RuntimeException(x.toString())
fun foo() {
val x: Int? = null
if (x == null) throw bar(<!TYPE_MISMATCH!>x<!>)
throw bar(<!DEBUG_INFO_AUTOCAST!>x<!>)
<!UNREACHABLE_CODE!>throw bar(<!DEBUG_INFO_AUTOCAST!>x<!>)<!>
}