KT-2752: move tests, that check whether there's no name clash, to JS backend tests
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user