Files
kotlin-fork/idea/testData/quickfix/foldTryCatch/conditional.kt
T
Dmitry Gridin 11a3482970 tests: apply official code style
#KT-38632 Fixed
2020-05-07 12:36:44 +00:00

15 lines
293 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
}
}