KT-2752: remove unnecessary hack that tries to treat annotation on property accessor as annotation on property itself; looks like FE has fixed that

This commit is contained in:
Alexey Andreev
2016-09-19 17:37:09 +03:00
parent e7e6a917eb
commit 00867cb269
@@ -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) {