Exhaustive when with 'Unit' result now also generates an exception in else branch #KT-12192 Fixed
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
fun test(i: Int): String {
|
||||
when (i) {
|
||||
0 -> return "0"
|
||||
1 -> return "1"
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
|
||||
fun box(): String = test(42)
|
||||
Reference in New Issue
Block a user