Replace 'when' with 'if': do not suggest if 'when' is used as expression and it has no 'else' branch

#KT-35329 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-12-06 23:17:54 +09:00
committed by Vladimir Dolzhenko
parent 893021f22b
commit 77b6881032
3 changed files with 19 additions and 0 deletions
@@ -0,0 +1,10 @@
//IS_APPLICABLE: false
enum class E { X, Y, Z}
fun test(e: E) {
val i = <caret>when (e) {
E.X -> 1
E.Y -> 2
E.Z -> 3
}
}