Improve: add more cases for MoveVariableDeclarationIntoWhen

#KT-30499 Fixed
This commit is contained in:
Dmitry Gridin
2019-03-21 16:32:41 +07:00
parent c84ff1d8b1
commit e11072b8c2
11 changed files with 120 additions and 1 deletions
@@ -0,0 +1,10 @@
// PROBLEM: none
fun test() = true
fun foo(): Int {
val a<caret> = test()
return null ?: when (a) {
true -> 42
else -> 5
}
}