Files
kotlin-fork/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryFinally.kt
T
2015-04-29 16:33:24 +02:00

22 lines
372 B
Kotlin
Vendored

// !CHECK_TYPE
fun tryFinally(x: Int?) {
try {
} finally {
x!!
}
checkSubtype<Int>(<!DEBUG_INFO_SMARTCAST!>x<!>)
}
fun tryCatchFinally(x: Int?) {
try {
x!!
} catch (e: Exception) {
x!!
} finally {
checkSubtype<Int>(<!TYPE_MISMATCH!>x<!>)
x!!
}
checkSubtype<Int>(<!DEBUG_INFO_SMARTCAST!>x<!>)
}