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
-2
@@ -1,10 +1,10 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.reflect.KMemberProperty
|
||||
import kotlin.reflect.KProperty1
|
||||
|
||||
class TestClass(var prop: Int)
|
||||
open class OtherClass
|
||||
fun OtherClass.test(prop: KMemberProperty<TestClass, Int>): Unit = throw Exception()
|
||||
fun OtherClass.test(prop: KProperty1<TestClass, Int>): Unit = throw Exception()
|
||||
class OtherClass2: OtherClass() {
|
||||
val result = test(TestClass::<!UNRESOLVED_REFERENCE!>result<!>)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user