"Replace if with when": do not add empty else block #KT-18681 Fixed

This commit is contained in:
Toshiaki Kameyama
2018-06-13 12:18:22 +03:00
committed by Mikhail Glukhikh
parent 3e207fd6b2
commit 0ae2054af4
4 changed files with 24 additions and 1 deletions
@@ -0,0 +1,8 @@
fun test(a: Any, b: Boolean): Int {
when (a) {
is Int -> {
<caret>if (b) return 1
}
}
return 0
}
@@ -0,0 +1,10 @@
fun test(a: Any, b: Boolean): Int {
when (a) {
is Int -> {
when {
b -> return 1
}
}
}
return 0
}