Files
kotlin/compiler/testData/codegen/box/classes/comanionObjectFieldVsClassField.kt
2019-11-19 11:00:09 +03:00

17 lines
258 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// 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()