Introduced getFqNameSafe method.
This commit is contained in:
+1
-1
@@ -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.getFqNameSafe(klass);
|
||||
|
||||
for (FunctionDescriptor fun : klass.getDefaultType().getMemberScope().getFunctions(functionName)) {
|
||||
CallableMemberDescriptor.Kind kind = fun.getKind();
|
||||
|
||||
+2
-2
@@ -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.getFqNameSafe(classDescriptor).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.getFqNameSafe(declarationDescriptor);
|
||||
ClassDescriptor classFromLibrary = getAutoTypeAnalogWithinBuiltins(originalClassFqName, qualifiedName);
|
||||
if (!isSameName(qualifiedName, originalClassFqName.asString()) && classFromLibrary == null) {
|
||||
throw new AlternativeSignatureMismatchException("Alternative signature type mismatch, expected: %s, actual: %s",
|
||||
|
||||
+1
-3
@@ -97,9 +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);
|
||||
assert fqNameUnsafe.isSafe() : "FQ name of a mapped class should be safe: " + fqNameUnsafe;
|
||||
FqName fqName = fqNameUnsafe.toSafe();
|
||||
FqName fqName = DescriptorUtils.getFqNameSafe(kotlinDescriptor);
|
||||
register(fqName, AsmTypeConstants.getType(javaClass));
|
||||
registerFqName(fqName, new FqName(javaClass.getCanonicalName()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user