Files
kotlin/compiler/testData/codegen/box/classes/comanionObjectFieldVsClassField.kt
2018-06-09 19:15:38 +03:00

16 lines
228 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// 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()