Fix platformStatic in reflection-jvm

This commit is contained in:
Yan Zhulanow
2015-08-14 20:10:41 +03:00
parent 4b3999bf6c
commit e0c85cba23
2 changed files with 2 additions and 3 deletions
@@ -66,7 +66,6 @@ open class KFunctionImpl protected constructor(
is Constructor<*> -> FunctionCaller.Constructor(member)
is Method -> when {
!Modifier.isStatic(member.modifiers) -> FunctionCaller.InstanceMethod(member)
descriptor.annotations.findAnnotation(PLATFORM_STATIC) != null,
descriptor.annotations.findAnnotation(JVM_STATIC) != null ->
FunctionCaller.JvmStaticInObject(member)
@@ -87,8 +87,8 @@ interface KMutablePropertyImpl<R> : KMutableProperty<R>, KPropertyImpl<R> {
private fun KPropertyImpl.Accessor<*>.computeCallerForAccessor(isGetter: Boolean): FunctionCaller<*> {
fun isJvmStaticProperty() =
property.descriptor.annotations.findAnnotation(PLATFORM_STATIC) != null ||
property.descriptor.annotations.findAnnotation(JVM_STATIC) != null
Annotations.Companion.findAnyAnnotation(property.descriptor.annotations, PLATFORM_STATIC) != null ||
Annotations.Companion.findAnyAnnotation(property.descriptor.annotations, JVM_STATIC) != null
fun isNotNullProperty() =
!TypeUtils.isNullableType(property.descriptor.type)