Files
kotlin/compiler/testData/codegen/box/when/emptyWhen.kt
Dmitry Petrov b3f390abe5 Fix KT-10775 Empty when causes compilation exception.
Expression type for an empty 'when' is 'kotlin.Unit'.
2016-01-29 18:50:48 +03:00

8 lines
94 B
Kotlin
Vendored

enum class A { X1, X2 }
fun box(): String {
when {}
when (A.X1) {}
return "OK"
}