Files
kotlin-fork/idea/testData/inspectionsLocal/liftOut/tryToAssignment/finallyWithCascadeUnmatchedAssignment.kt
T
2017-07-11 15:14:30 +03:00

17 lines
294 B
Kotlin
Vendored

fun doSomething() {}
fun test(n: Int) {
var res: String? = null
var foo: String? = null
<caret>try {
res = "success"
} catch (e: Exception) {
throw e
} finally {
if (n == 1)
doSomething()
else
foo = "finally"
}
}