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:
@@ -4,7 +4,7 @@ object A {
|
||||
|
||||
val b: String = "OK"
|
||||
|
||||
platformStatic val c: String = "OK"
|
||||
platformStatic var c: String = "Fail"
|
||||
|
||||
platformStatic fun test1() : String {
|
||||
return b
|
||||
@@ -36,6 +36,8 @@ fun box(): String {
|
||||
|
||||
if ((A::test4)(A) != "1OK") return "fail 4"
|
||||
|
||||
(A::c).set(A, "OK")
|
||||
|
||||
if (((A::c).get(A)) != "OK") return "fail 5"
|
||||
|
||||
return "OK"
|
||||
|
||||
Reference in New Issue
Block a user