KT-234 Force when() expressions to have an 'else' branch

KT-973 Unreachable code
This commit is contained in:
svtk
2012-01-18 13:31:42 +04:00
parent 94e3cc9976
commit becd713111
23 changed files with 175 additions and 50 deletions
@@ -1,3 +1,4 @@
fun isZero(x: Int) = when(x) {
0 -> true
else -> throw Exception()
}