Convert "lift return / assignment" intentions into a single inspection
Also includes minor test fix, related to KT-14900
This commit is contained in:
committed by
Mikhail Glukhikh
parent
8f33bd0768
commit
2d1abda9a1
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// PROBLEM: none
|
||||
fun <T> doSomething(a: T) {}
|
||||
|
||||
fun test(n: Int): String {
|
||||
var res: String
|
||||
|
||||
<caret>when (n) {
|
||||
1 -> {
|
||||
doSomething("***")
|
||||
res = "one"
|
||||
}
|
||||
else -> {
|
||||
res = "two"
|
||||
doSomething("***")
|
||||
}
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user