Quick-fix for reassignment in try / catch (fold to assignment) #KT-13778 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-09-09 18:13:16 +03:00
parent 69dc18b8b4
commit edacc7f8d7
11 changed files with 213 additions and 0 deletions
@@ -0,0 +1,15 @@
// "Lift assignment out of 'try' expression" "true"
// WITH_RUNTIME
fun foo() {
val x: Int
x = try {
1
} catch (e: RuntimeException) {
2
} catch (e: Exception) {
3
} catch (e: Throwable) {
4
}
}