mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-13 08:31:31 +00:00
12 lines
220 B
Kotlin
Vendored
12 lines
220 B
Kotlin
Vendored
class C {
|
|
@kotlin.jvm.JvmOverloads public fun foo(s: String = "OK"): String {
|
|
return s
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
val c = C()
|
|
val m = c.javaClass.getMethod("foo")
|
|
return m.invoke(c) as String
|
|
}
|