Files
kotlin-fork/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Throw.jet
T
2012-06-20 20:33:58 +04:00

10 lines
215 B
Plaintext

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