mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
12 lines
242 B
Plaintext
12 lines
242 B
Plaintext
>>> enum class E {
|
|
... FIRST {
|
|
... override fun foo() = "HELLO"
|
|
... }
|
|
... SECOND {
|
|
... override fun foo() = "WORLD"
|
|
... }
|
|
... open fun foo() = "E"
|
|
... }
|
|
>>> E.FIRST.foo() + " " + E.SECOND.foo()
|
|
HELLO WORLD
|