Implicit exhaustive when check for definite variable initialization (KT-8700)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
52c3fb03a2
commit
011a9f23b9
@@ -1,10 +1,10 @@
|
||||
fun foo(b: Boolean): Int {
|
||||
val x: Int
|
||||
val y: Int
|
||||
when (b) {
|
||||
<!DEBUG_INFO_IMPLICIT_EXHAUSTIVE!>when (b) {
|
||||
true -> y = 1
|
||||
false -> y = 0
|
||||
}
|
||||
}<!>
|
||||
// x is initialized here
|
||||
x = 3
|
||||
return x + y
|
||||
|
||||
Reference in New Issue
Block a user