Implicit exhaustive when check for definite variable initialization (KT-8700)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
52c3fb03a2
commit
011a9f23b9
@@ -3,11 +3,11 @@ enum class X { A, B, C, D }
|
||||
|
||||
fun foo(arg: X): String {
|
||||
val res: String
|
||||
when (arg) {
|
||||
<!DEBUG_INFO_IMPLICIT_EXHAUSTIVE!>when (arg) {
|
||||
X.A -> res = "A"
|
||||
X.B -> res = "B"
|
||||
X.C -> res = "C"
|
||||
X.D -> res = "D"
|
||||
}
|
||||
}<!>
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user