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
@@ -0,0 +1,16 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Any) {
|
||||
var res: String
|
||||
<caret>when (x) {
|
||||
is String ->
|
||||
if (x.length > 3) res = "long string"
|
||||
else res = "short string"
|
||||
is Int ->
|
||||
if (x > 999 || x < -99) res = "long int"
|
||||
else res = "short int"
|
||||
is Long ->
|
||||
TODO()
|
||||
else ->
|
||||
res = "I don't know"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user