mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-14 00:21:34 +00:00
18 lines
331 B
Kotlin
Vendored
18 lines
331 B
Kotlin
Vendored
import kotlin.jvm.JvmStatic as static
|
|
|
|
object Obj {
|
|
@static fun foo() {}
|
|
}
|
|
|
|
class C {
|
|
companion object {
|
|
@static fun bar() {}
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
(Obj::class.members.single { it.name == "foo" }).call(Obj)
|
|
(C.Companion::class.members.single { it.name == "bar" }).call(C.Companion)
|
|
return "OK"
|
|
}
|