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,8 @@
fun box(): String {
val x = 3
when (x) {
1 -> {}
2 -> {}
}
return "OK"
}