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