Files
kotlin-fork/idea/testData/checker/regression/Jet183.kt
T
Alexander Udalov ae401cac0f Prohibit type parameters for enum classes
#KT-5696 Fixed
2014-10-21 00:16:07 +04:00

16 lines
285 B
Kotlin

enum class ProtocolState {
WAITING {
override fun signal() = ProtocolState.TALKING
}
TALKING {
override fun signal() = ProtocolState.WAITING
}
abstract fun signal() : ProtocolState
}
fun box() {
val <warning>x</warning>: ProtocolState = ProtocolState.WAITING
}