Files
kotlin-fork/compiler/testData/codegen/box/classes/comanionObjectFieldVsClassField.kt
T

17 lines
260 B
Kotlin
Vendored

// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: STDLIB_TEXT
// 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()