KT-2752: move tests, that check whether there's no name clash, to JS backend tests

This commit is contained in:
Alexey Andreev
2016-05-31 14:28:54 +03:00
parent 5ce158f297
commit 50dd1e31c3
26 changed files with 104 additions and 173 deletions
@@ -23,8 +23,7 @@ enum class PredefinedAnnotation(fqName: String) {
NATIVE("kotlin.js.native"),
NATIVE_INVOKE("kotlin.js.nativeInvoke"),
NATIVE_GETTER("kotlin.js.nativeGetter"),
NATIVE_SETTER("kotlin.js.nativeSetter"),
JS_NAME("kotlin.js.JsName");
NATIVE_SETTER("kotlin.js.nativeSetter");
val fqName: FqName = FqName(fqName)
@@ -33,6 +33,7 @@ import java.util.List;
import java.util.Set;
public final class AnnotationsUtils {
private static final String JS_NAME = "kotlin.js.JsName";
private AnnotationsUtils() {
}
@@ -128,7 +129,7 @@ public final class AnnotationsUtils {
@Nullable
public static String getJsName(@NotNull DeclarationDescriptor descriptor) {
AnnotationDescriptor annotation = getAnnotationByName(descriptor, PredefinedAnnotation.JS_NAME.getFqName());
AnnotationDescriptor annotation = getAnnotationByName(descriptor, new FqName(JS_NAME));
if (annotation == null) return null;
ConstantValue<?> value = annotation.getAllValueArguments().values().iterator().next();