Fix KT-10775 Empty when causes compilation exception.
Expression type for an empty 'when' is 'kotlin.Unit'.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
enum class A { X1, X2 }
|
||||
|
||||
fun box(): String {
|
||||
when {}
|
||||
when (A.X1) {}
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user