Files
kotlin-fork/idea/testData/quickfix/foldTryCatch/conditional.kt
T
2019-05-31 18:00:56 +07:00

16 lines
297 B
Kotlin
Vendored

// "class org.jetbrains.kotlin.idea.quickfix.LiftAssignmentOutOfTryFix" "false"
// ACTION: Change to var
// DISABLE-ERRORS
// WITH_RUNTIME
fun foo(arg: Boolean) {
val x: Int
try {
if (arg) {
x = 1
}
}
catch (e: Exception) {
<caret>x = 2
}
}