Fix reflection for local delegated properties inside interface

#KT-19690
This commit is contained in:
Alexander Udalov
2017-08-17 12:29:16 +03:00
committed by Mikhael Bogdanov
parent 97d46e76f5
commit 4d2fbf1801
6 changed files with 54 additions and 1 deletions
@@ -0,0 +1,23 @@
// TARGET_BACKEND: JVM
// WITH_REFLECT
import kotlin.reflect.KProperty
import kotlin.test.assertEquals
object Delegate {
operator fun getValue(z: Any?, p: KProperty<*>): String? {
assertEquals("val x: kotlin.String?", p.toString())
return "OK"
}
}
interface Foo {
fun bar(): String {
val x by Delegate
return x!!
}
}
object O : Foo
fun box(): String = O.bar()