Files
kotlin-fork/idea/testData/checker/regression/Jet183.kt
T
Pavel V. Talanov c04b52561e "abstract" modifier on enum class is an error
#KT-3454 Fixed
2014-10-10 17:43:32 +04:00

23 lines
330 B
Kotlin

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