Files
kotlin-fork/compiler/testData/codegen/box/delegation/kt54654.kt
T
2022-10-27 11:08:55 +00:00

23 lines
412 B
Kotlin
Vendored

// TARGET_BACKEND: JVM_IR
// ISSUE: KT-54654
fun accessProperty(b: B) = b.property
fun accessFunction(b: B) = b.function()
fun getString_1(): String = "O"
fun getString_2(): String = "K"
interface A {
val property get() = getString_1()
fun function() = getString_2()
}
class B(val a: A) : A by a
class C : A
fun box(): String {
val b = B(C())
return accessProperty(b) + accessFunction(b)
}