Implicit exhaustive whens now have exception in else branch #KT-8700 Fixed

This commit is contained in:
Mikhail Glukhikh
2015-12-04 18:43:44 +03:00
committed by Mikhail Glukhikh
parent 011a9f23b9
commit 7d6ccc40c2
16 changed files with 167 additions and 18 deletions
@@ -0,0 +1,14 @@
enum class A { V }
fun box(): String {
val a: A = A.V
val b: Boolean
when (a) {
A.V -> b = true
}
return if (b) "OK" else "FAIL"
}
// 0 TABLESWITCH
// 1 LOOKUPSWITCH
// 1 ATHROW