Minor. Renamed method.
This commit is contained in:
+5
-5
@@ -51,7 +51,7 @@ import org.jetbrains.jet.renderer.DescriptorRenderer;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import static org.jetbrains.jet.lang.resolve.DescriptorUtils.getFQName;
|
||||
import static org.jetbrains.jet.lang.resolve.DescriptorUtils.getFqName;
|
||||
import static org.jetbrains.jet.lang.resolve.java.resolver.TypeUsage.*;
|
||||
import static org.jetbrains.jet.lang.types.Variance.INVARIANT;
|
||||
|
||||
@@ -169,7 +169,7 @@ public class SignaturesPropagationData {
|
||||
) {
|
||||
assert receiverType == null : "Parameters before propagation have receiver type," +
|
||||
" but propagation should be disabled for functions compiled from Kotlin in class: " +
|
||||
DescriptorUtils.getFQName(containingClass);
|
||||
DescriptorUtils.getFqName(containingClass);
|
||||
|
||||
JetType resultReceiverType = null;
|
||||
List<ValueParameterDescriptor> resultParameters = Lists.newArrayList();
|
||||
@@ -260,8 +260,8 @@ public class SignaturesPropagationData {
|
||||
Collections.sort(superFunctions, new Comparator<FunctionDescriptor>() {
|
||||
@Override
|
||||
public int compare(FunctionDescriptor fun1, FunctionDescriptor fun2) {
|
||||
FqNameUnsafe fqName1 = getFQName(fun1.getContainingDeclaration());
|
||||
FqNameUnsafe fqName2 = getFQName(fun2.getContainingDeclaration());
|
||||
FqNameUnsafe fqName1 = getFqName(fun1.getContainingDeclaration());
|
||||
FqNameUnsafe fqName2 = getFqName(fun2.getContainingDeclaration());
|
||||
return fqName1.asString().compareTo(fqName2.asString());
|
||||
}
|
||||
});
|
||||
@@ -282,7 +282,7 @@ public class SignaturesPropagationData {
|
||||
for (JetType supertype : TypeUtils.getAllSupertypes(containingClass.getDefaultType())) {
|
||||
ClassifierDescriptor klass = supertype.getConstructor().getDeclarationDescriptor();
|
||||
assert klass != null;
|
||||
FqName fqName = DescriptorUtils.getFQName(klass).toSafe();
|
||||
FqName fqName = DescriptorUtils.getFqName(klass).toSafe();
|
||||
|
||||
for (FunctionDescriptor fun : klass.getDefaultType().getMemberScope().getFunctions(functionName)) {
|
||||
CallableMemberDescriptor.Kind kind = fun.getKind();
|
||||
|
||||
+5
-5
@@ -98,7 +98,7 @@ public class TypeTransformingVisitor extends JetVisitor<JetType, Void> {
|
||||
}
|
||||
|
||||
private JetType visitCommonType(@NotNull ClassDescriptor classDescriptor, @NotNull JetTypeElement type) {
|
||||
return visitCommonType(DescriptorUtils.getFQName(classDescriptor).toSafe().asString(), type);
|
||||
return visitCommonType(DescriptorUtils.getFqName(classDescriptor).toSafe().asString(), type);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -109,7 +109,7 @@ public class TypeTransformingVisitor extends JetVisitor<JetType, Void> {
|
||||
TypeConstructor originalTypeConstructor = originalType.getConstructor();
|
||||
ClassifierDescriptor declarationDescriptor = originalTypeConstructor.getDeclarationDescriptor();
|
||||
assert declarationDescriptor != null;
|
||||
FqName originalClassFqName = DescriptorUtils.getFQName(declarationDescriptor).toSafe();
|
||||
FqName originalClassFqName = DescriptorUtils.getFqName(declarationDescriptor).toSafe();
|
||||
ClassDescriptor classFromLibrary = getAutoTypeAnalogWithinBuiltins(originalClassFqName, qualifiedName);
|
||||
if (!isSameName(qualifiedName, originalClassFqName.asString()) && classFromLibrary == null) {
|
||||
throw new AlternativeSignatureMismatchException("Alternative signature type mismatch, expected: %s, actual: %s",
|
||||
@@ -191,7 +191,7 @@ public class TypeTransformingVisitor extends JetVisitor<JetType, Void> {
|
||||
if (altProjectionKind == parameter.getVariance()) {
|
||||
if (strictMode) {
|
||||
throw new AlternativeSignatureMismatchException("Projection kind '%s' is redundant",
|
||||
altProjectionKind, DescriptorUtils.getFQName(typeConstructor.getDeclarationDescriptor()));
|
||||
altProjectionKind, DescriptorUtils.getFqName(typeConstructor.getDeclarationDescriptor()));
|
||||
}
|
||||
else {
|
||||
altProjectionKind = projectionKind;
|
||||
@@ -199,7 +199,7 @@ public class TypeTransformingVisitor extends JetVisitor<JetType, Void> {
|
||||
}
|
||||
else {
|
||||
throw new AlternativeSignatureMismatchException("Projection kind '%s' is conflicting with variance of %s",
|
||||
altProjectionKind, DescriptorUtils.getFQName(typeConstructor.getDeclarationDescriptor()));
|
||||
altProjectionKind, DescriptorUtils.getFqName(typeConstructor.getDeclarationDescriptor()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -216,7 +216,7 @@ public class TypeTransformingVisitor extends JetVisitor<JetType, Void> {
|
||||
|
||||
Collection<ClassDescriptor> descriptors = JavaToKotlinClassMap.getInstance().mapPlatformClass(javaFqName);
|
||||
for (ClassDescriptor descriptor : descriptors) {
|
||||
String fqName = DescriptorUtils.getFQName(descriptor).asString();
|
||||
String fqName = DescriptorUtils.getFqName(descriptor).asString();
|
||||
if (isSameName(qualifiedName, fqName)) {
|
||||
return descriptor;
|
||||
}
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ public class KotlinToJavaTypesMap extends JavaToKotlinClassMapBuilder {
|
||||
@Override
|
||||
protected void register(@NotNull Class<?> javaClass, @NotNull ClassDescriptor kotlinDescriptor, @NotNull Direction direction) {
|
||||
if (direction == Direction.BOTH || direction == Direction.KOTLIN_TO_JAVA) {
|
||||
FqNameUnsafe fqNameUnsafe = DescriptorUtils.getFQName(kotlinDescriptor);
|
||||
FqNameUnsafe fqNameUnsafe = DescriptorUtils.getFqName(kotlinDescriptor);
|
||||
assert fqNameUnsafe.isSafe() : "FQ name of a mapped class should be safe: " + fqNameUnsafe;
|
||||
FqName fqName = fqNameUnsafe.toSafe();
|
||||
register(fqName, AsmTypeConstants.getType(javaClass));
|
||||
|
||||
Reference in New Issue
Block a user