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:
committed by
Vladimir Dolzhenko
parent
893021f22b
commit
77b6881032
+10
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user