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

18 lines
362 B
Kotlin
Vendored

// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND_FIR: JVM_IR
interface IFoo {
fun getO(): String
val k: String
val ok: String get() = getO() + k
}
inline class InlineFooImpl(val s: String): IFoo {
override fun getO(): String = s
override val k: String get() = "K"
}
class Test(s: String) : IFoo by InlineFooImpl(s)
fun box() = Test("O").ok