Files
kotlin-fork/idea/testData/inspectionsLocal/liftOut/ifToAssignment/innerIfTransformed.kt
T
Mikhail Glukhikh 2d1abda9a1 Convert "lift return / assignment" intentions into a single inspection
Also includes minor test fix, related to KT-14900
2017-07-07 18:15:14 +03:00

24 lines
422 B
Kotlin
Vendored

fun <T> doSomething(a: T) {}
fun test(n: Int): String {
var res: String
if (n == 1) {
<caret>if (3 > 2) {
doSomething("***")
res = "one"
} else {
doSomething("***")
res = "???"
}
} else if (n == 2) {
doSomething("***")
res = "two"
} else {
doSomething("***")
res = "too many"
}
return res
}