Convert "lift return / assignment" intentions into a single inspection

Also includes minor test fix, related to KT-14900
This commit is contained in:
Mikhail Glukhikh
2017-06-27 13:01:33 +03:00
committed by Mikhail Glukhikh
parent 8f33bd0768
commit 2d1abda9a1
91 changed files with 373 additions and 480 deletions
@@ -0,0 +1,23 @@
fun <T> doSomething(a: T) {}
fun test(n: Int): String {
var res: String
if (3 > 2) {
<caret>res = when (n) {
1 -> {
doSomething("***")
"one"
}
else -> {
doSomething("***")
"two"
}
}
} else {
doSomething("***")
res = "???"
}
return res
}