Introduce "Lift return out of try" intention #KT-18830 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
8f9b680fc6
commit
8cc9330e63
@@ -0,0 +1,18 @@
|
||||
// WITH_RUNTIME
|
||||
fun test() {
|
||||
var res: String? = null
|
||||
|
||||
<caret>res = try {
|
||||
try {
|
||||
"success"
|
||||
} catch (e: Exception) {
|
||||
TODO()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
try {
|
||||
TODO()
|
||||
} catch (e: Exception) {
|
||||
"failure"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user