CFG exhaustive when else instruction for KT-8700

This commit is contained in:
Mikhail Glukhikh
2015-12-14 16:08:01 +03:00
committed by Mikhail Glukhikh
parent 697228eae0
commit b805ce06c2
25 changed files with 446 additions and 51 deletions
@@ -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
}