Fix for KT-16441: NoSuchFieldError: $$delegatedProperties when delegating through provideDelegate in companion object

#KT-16441 Fixed
This commit is contained in:
Mikhael Bogdanov
2017-02-20 16:10:40 +01:00
parent a8625b632d
commit d24ebf711b
87 changed files with 164 additions and 98 deletions
@@ -0,0 +1,16 @@
import kotlin.reflect.KProperty
class Delegate {
operator fun provideDelegate(thisRef: Any?, property: KProperty<*>) = this
operator fun getValue(thisRef: Any?, property: KProperty<*>) = "OK"
}
class TestClass {
companion object {
val test by Delegate()
}
}
fun box(): String {
return TestClass.test
}