Support interface delegation to inline class values (KT-27318)

This commit is contained in:
Dmitry Petrov
2018-10-01 14:15:44 +03:00
parent 5480bf69e8
commit 6fa436911a
7 changed files with 47 additions and 1 deletions
@@ -0,0 +1,18 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND: 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