Minor, do not use ".java.kotlin" on KClass instances
This commit is contained in:
Vendored
+2
-2
@@ -12,13 +12,13 @@ class A {
|
||||
|
||||
fun box(): String {
|
||||
run {
|
||||
val foo: KProperty1<A, *> = A::class.java.kotlin.memberProperties.single()
|
||||
val foo: KProperty1<A, *> = A::class.memberProperties.single()
|
||||
assert(foo.name == "foo") { "Fail name: $foo (${foo.name})" }
|
||||
assert(foo.get(A()) == "member") { "Fail value: ${foo.get(A())}" }
|
||||
}
|
||||
|
||||
run {
|
||||
val foo: KProperty2<A, *, *> = A::class.java.kotlin.memberExtensionProperties.single()
|
||||
val foo: KProperty2<A, *, *> = A::class.memberExtensionProperties.single()
|
||||
assert(foo.name == "foo") { "Fail name: $foo (${foo.name})" }
|
||||
foo as KProperty2<A, Unit, *>
|
||||
assert(foo.get(A(), Unit) == "extension") { "Fail value: ${foo.get(A(), Unit)}" }
|
||||
|
||||
Reference in New Issue
Block a user