From e0c85cba238f51799757a4142e0a72c3e6f8f5e4 Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Fri, 14 Aug 2015 20:10:41 +0300 Subject: [PATCH] Fix platformStatic in reflection-jvm --- .../src/kotlin/reflect/jvm/internal/KFunctionImpl.kt | 1 - .../src/kotlin/reflect/jvm/internal/KPropertyImpl.kt | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KFunctionImpl.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KFunctionImpl.kt index 564974e5df9..edd1d89a6b9 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KFunctionImpl.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KFunctionImpl.kt @@ -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) diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KPropertyImpl.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KPropertyImpl.kt index 7a27e7db248..743bc580fe1 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KPropertyImpl.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KPropertyImpl.kt @@ -87,8 +87,8 @@ interface KMutablePropertyImpl : KMutableProperty, KPropertyImpl { 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)