Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/interfaceDelegation/interfaceImplementationByDelegation.kt
T
2021-10-11 12:09:52 +03:00

19 lines
401 B
Kotlin
Vendored

// WITH_RUNTIME
interface IFoo {
fun getO(): String
val k: String
val ok: String get() = getO() + k
}
@Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE")
@kotlin.jvm.JvmInline
value 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