Rename KClass.properties and extensionProperties: prepend 'member'
To better emphasize the fact that all returned properties require an instance of the class they are declared in. Another issue was that 'Some::class.extensionProperties' was sometimes incorrectly perceived as "get all extension properties available on the class Some"
This commit is contained in:
+1
-1
@@ -22,7 +22,7 @@ fun box(): String {
|
||||
assertEquals("<get-baz>", A::baz.getter.name)
|
||||
assertEquals("<set-baz>", A::baz.setter.name)
|
||||
|
||||
val me = A::class.extensionProperties.single() as KMutableProperty2<A, String, String>
|
||||
val me = A::class.memberExtensionProperties.single() as KMutableProperty2<A, String, String>
|
||||
assertEquals("<get-quux>", me.getter.name)
|
||||
assertEquals("<set-quux>", me.setter.name)
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -8,7 +8,7 @@ class C(var state: String) {
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val prop = C::class.extensionProperties.single() as KMutableProperty2<C, String, String>
|
||||
val prop = C::class.memberExtensionProperties.single() as KMutableProperty2<C, String, String>
|
||||
|
||||
val c = C("")
|
||||
assertEquals("3", prop.getter.invoke(c, "abc"))
|
||||
|
||||
Reference in New Issue
Block a user