Do not throw an exception when a when-statement with no else makes no match
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
enum class En {
|
||||
A
|
||||
B
|
||||
}
|
||||
|
||||
fun box(): String = when(En.A) {
|
||||
En.A -> "OK"
|
||||
En.B -> "Fail 1"
|
||||
}
|
||||
Reference in New Issue
Block a user