From 00867cb269d7f28a772ca249908c5e46228d361d Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Mon, 19 Sep 2016 17:37:09 +0300 Subject: [PATCH] KT-2752: remove unnecessary hack that tries to treat annotation on property accessor as annotation on property itself; looks like FE has fixed that --- .../kotlin/js/translate/utils/AnnotationsUtils.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/js/js.frontend/src/org/jetbrains/kotlin/js/translate/utils/AnnotationsUtils.java b/js/js.frontend/src/org/jetbrains/kotlin/js/translate/utils/AnnotationsUtils.java index a899d972789..780a758a296 100644 --- a/js/js.frontend/src/org/jetbrains/kotlin/js/translate/utils/AnnotationsUtils.java +++ b/js/js.frontend/src/org/jetbrains/kotlin/js/translate/utils/AnnotationsUtils.java @@ -124,16 +124,7 @@ public final class AnnotationsUtils { @Nullable public static AnnotationDescriptor getJsNameAnnotation(@NotNull DeclarationDescriptor descriptor) { - AnnotationDescriptor annotation = getAnnotationByName(descriptor, new FqName(JS_NAME)); - if (annotation == null) return null; - - if (descriptor instanceof PropertyAccessorDescriptor) { - PropertyAccessorDescriptor accessor = (PropertyAccessorDescriptor) descriptor; - AnnotationDescriptor propertyAnnotation = getAnnotationByName(accessor.getCorrespondingProperty(), new FqName(JS_NAME)); - if (propertyAnnotation == annotation) return null; - } - - return annotation; + return getAnnotationByName(descriptor, new FqName(JS_NAME)); } public static boolean isPredefinedObject(@NotNull DeclarationDescriptor descriptor) {