Files
kotlin/compiler/testData/codegen/box/inlineClasses/interfaceImplementationByDelegation.kt
2019-06-13 12:25:06 +02:00

17 lines
332 B
Kotlin
Vendored

// !LANGUAGE: +InlineClasses
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