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

15 lines
270 B
Kotlin
Vendored

// "Lift assignment out of 'try' expression" "true"
// WITH_RUNTIME
fun foo() {
val x: Int
try {
x = 1
} catch (e: RuntimeException) {
<caret>x = 2
} catch (e: Exception) {
x = 3
} catch (e: Throwable) {
x = 4
}
}