Do not throw an exception when a when-statement with no else makes no match

This commit is contained in:
Andrey Breslav
2013-10-18 18:34:54 +04:00
parent aacf133ef6
commit ea2b6e4546
10 changed files with 111 additions and 2 deletions
@@ -0,0 +1,14 @@
enum class En {
A
B
}
fun box(): String {
val u: Unit = when(En.A) {
En.A -> {}
En.B -> {}
}
return "OK"
}