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:
+4
-4
@@ -14,10 +14,10 @@ class Sub : Super() {
|
||||
fun box(): String {
|
||||
val sub = Sub::class
|
||||
|
||||
assertEquals(listOf("a", "c"), sub.properties.map { it.name }.sort())
|
||||
assertEquals(listOf("b", "d"), sub.extensionProperties.map { it.name }.sort())
|
||||
assertEquals(listOf("c"), sub.declaredProperties.map { it.name })
|
||||
assertEquals(listOf("d"), sub.declaredExtensionProperties.map { it.name })
|
||||
assertEquals(listOf("a", "c"), sub.memberProperties.map { it.name }.sort())
|
||||
assertEquals(listOf("b", "d"), sub.memberExtensionProperties.map { it.name }.sort())
|
||||
assertEquals(listOf("c"), sub.declaredMemberProperties.map { it.name })
|
||||
assertEquals(listOf("d"), sub.declaredMemberExtensionProperties.map { it.name })
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user