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:
+2
-3
@@ -1,4 +1,3 @@
|
||||
// !CHECK_TYPE
|
||||
// !DIAGNOSTICS:-UNUSED_VARIABLE
|
||||
// FILE: JavaClass.java
|
||||
|
||||
@@ -20,8 +19,8 @@ import JavaClass.*
|
||||
import kotlin.reflect.*
|
||||
|
||||
fun test() {
|
||||
val pubFinRef: KTopLevelProperty<String> = ::publicFinal
|
||||
val pubMutRef: KMutableTopLevelProperty<Any?> = ::publicMutable
|
||||
val pubFinRef: KProperty0<String> = ::publicFinal
|
||||
val pubMutRef: KMutableProperty0<Any?> = ::publicMutable
|
||||
val protFinRef: KProperty<Double> = ::protectedFinal
|
||||
val protMutRef: KMutableProperty<Char> = ::protectedMutable
|
||||
val privFinRef: KProperty<JavaClass?> = ::<!INVISIBLE_MEMBER!>privateFinal<!>
|
||||
|
||||
Reference in New Issue
Block a user