Fix KT-10775 Empty when causes compilation exception.

Expression type for an empty 'when' is 'kotlin.Unit'.
This commit is contained in:
Dmitry Petrov
2016-01-29 14:34:38 +03:00
parent dcc6262f47
commit b3f390abe5
3 changed files with 27 additions and 14 deletions
+7
View File
@@ -0,0 +1,7 @@
enum class A { X1, X2 }
fun box(): String {
when {}
when (A.X1) {}
return "OK"
}