Fix for KT-12127: Undeclared type variable on delegated property backing field
#KT-12127 Fixed
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user