Simplify property hierarchy in reflection
Leave only 3*2 = 6 classes: KProperty0, KProperty1, KProperty2 and their mutable analogs, depending on the number of receivers a property takes
This commit is contained in:
@@ -6,7 +6,7 @@ class A(var g: A) {
|
||||
val f: Int = 0
|
||||
|
||||
fun test() {
|
||||
checkSubtype<KMemberProperty<A, Int>>(::f)
|
||||
checkSubtype<KMutableMemberProperty<A, A>>(::g)
|
||||
checkSubtype<KProperty1<A, Int>>(::f)
|
||||
checkSubtype<KMutableProperty1<A, A>>(::g)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user