Files
kotlin-fork/compiler/testData/codegen/box/classes/comanionObjectFieldVsClassField.kt
T
2020-11-09 16:04:43 +03:00

18 lines
296 B
Kotlin
Vendored

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