mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
21 lines
420 B
Kotlin
Vendored
21 lines
420 B
Kotlin
Vendored
import kotlin.jvm.JvmStatic
|
|
|
|
enum class A {
|
|
;
|
|
companion object {
|
|
val foo: String = "OK"
|
|
|
|
@JvmStatic val bar: String = "OK"
|
|
|
|
@JvmStatic fun baz() = foo
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
if (Test.foo() != "OK") return "Fail foo"
|
|
if (Test.bar() != "OK") return "Fail bar"
|
|
if (Test.getBar() != "OK") return "Fail getBar"
|
|
if (Test.baz() != "OK") return "Fail baz"
|
|
return "OK"
|
|
}
|