Files
kotlin-fork/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Throw.jet
T
2012-06-15 17:06:41 +04:00

11 lines
250 B
Plaintext

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