Fix for KT-12127: Undeclared type variable on delegated property backing field

#KT-12127 Fixed
This commit is contained in:
Mikhael Bogdanov
2016-05-04 14:32:49 +03:00
parent bac5c4d70b
commit ee7bbbf530
4 changed files with 33 additions and 9 deletions
@@ -0,0 +1,18 @@
import kotlin.reflect.KProperty
import kotlin.reflect.KProperty1
class DVal<T, R, P: KProperty1<T, R>>(val kmember: P) {
operator fun getValue(t: T, p: KProperty<*>): R {
return kmember.get(t)
}
}
class Value<T>(var text: String? = null)
class Test {
val <T> Value<T>.additionalText by DVal(Value<T>::text)
}
// field: Test::additionalText$delegate
// jvm signature: LDVal;
// generic signature: null