KT-42933 inline class backing field can't be static

This commit is contained in:
Dmitry Petrov
2020-11-25 13:39:15 +03:00
parent f6abc5c3cf
commit e5dce9f994
10 changed files with 59 additions and 3 deletions
@@ -0,0 +1,12 @@
class Delegate {
operator fun getValue(t: Any?, p: Any): String = "OK"
}
inline class Kla1(val default: Int) {
fun getValue(): String {
val prop by Delegate()
return prop
}
}
fun box() = Kla1(1).getValue()