Improve: add more cases for MoveVariableDeclarationIntoWhen
#KT-30499 Fixed
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
fun test() = true
|
||||
|
||||
fun foo(): Int {
|
||||
val a<caret> = test()
|
||||
return when (a) {
|
||||
true -> 42
|
||||
else -> null
|
||||
} ?: 55
|
||||
}
|
||||
Reference in New Issue
Block a user