mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
15 lines
203 B
Kotlin
Vendored
15 lines
203 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
|
|
class Host {
|
|
val ok = "OK"
|
|
|
|
fun foo() = run { bar(ok) }
|
|
|
|
companion object {
|
|
val ok = 0
|
|
|
|
fun bar(s: String) = s.substring(ok)
|
|
}
|
|
}
|
|
|
|
fun box() = Host().foo() |