JET-183 Typechecker fails with enum constants

This commit is contained in:
Andrey Breslav
2011-07-13 18:01:51 +04:00
parent 73bb5a1d4e
commit 42397c887a
2 changed files with 36 additions and 3 deletions
@@ -0,0 +1,22 @@
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(): String {
val x: ProtocolState = ProtocolState.WAITING
}