CFG exhaustive when else instruction for KT-8700
This commit is contained in:
committed by
Mikhail Glukhikh
parent
697228eae0
commit
b805ce06c2
@@ -0,0 +1,11 @@
|
||||
fun foo(b: Boolean): Int {
|
||||
val x: Int
|
||||
val y: Int
|
||||
when (b) {
|
||||
true -> y = 1
|
||||
false -> y = 0
|
||||
}
|
||||
// x is initialized here
|
||||
x = 3
|
||||
return x + y
|
||||
}
|
||||
Reference in New Issue
Block a user