Restore binary compatibility with android.nav.safearg plugin
In recent a39fbd3822 commit
contextReceiverParameters was introduced and new parameter to descriptor
methods was added. Luckily, it is low-level methods enough -- i.e.
they related to new descriptor creation, but still, some compatibility
is broken. This commit fixes usages in the android.nav.safearg that I
have found in the IDEA repo, maybe we will find other after some
compatibility testing.
This commit is contained in:
+11
@@ -120,6 +120,17 @@ public class PropertyDescriptorImpl extends VariableDescriptorWithInitializerImp
|
|||||||
return setter != null ? setter.getValueParameters().get(0).getType() : null;
|
return setter != null ? setter.getValueParameters().get(0).getType() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@kotlin.Deprecated(message = "This method is left for binary compatibility with android.nav.safearg plugin. Used in SafeArgSyntheticDescriptorGenerator.kt")
|
||||||
|
public void setType(
|
||||||
|
@NotNull KotlinType outType,
|
||||||
|
@ReadOnly @NotNull List<? extends TypeParameterDescriptor> typeParameters,
|
||||||
|
@Nullable ReceiverParameterDescriptor dispatchReceiverParameter,
|
||||||
|
@Nullable ReceiverParameterDescriptor extensionReceiverParameter
|
||||||
|
) {
|
||||||
|
setType(outType, typeParameters, dispatchReceiverParameter, extensionReceiverParameter,
|
||||||
|
Collections.<ReceiverParameterDescriptor>emptyList());
|
||||||
|
}
|
||||||
|
|
||||||
public void setType(
|
public void setType(
|
||||||
@NotNull KotlinType outType,
|
@NotNull KotlinType outType,
|
||||||
@ReadOnly @NotNull List<? extends TypeParameterDescriptor> typeParameters,
|
@ReadOnly @NotNull List<? extends TypeParameterDescriptor> typeParameters,
|
||||||
|
|||||||
+17
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.descriptors.impl;
|
package org.jetbrains.kotlin.descriptors.impl;
|
||||||
|
|
||||||
|
import kotlin.DeprecationLevel;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.kotlin.descriptors.*;
|
import org.jetbrains.kotlin.descriptors.*;
|
||||||
@@ -23,6 +24,7 @@ import org.jetbrains.kotlin.descriptors.annotations.Annotations;
|
|||||||
import org.jetbrains.kotlin.name.Name;
|
import org.jetbrains.kotlin.name.Name;
|
||||||
import org.jetbrains.kotlin.types.KotlinType;
|
import org.jetbrains.kotlin.types.KotlinType;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -50,6 +52,21 @@ public class SimpleFunctionDescriptorImpl extends FunctionDescriptorImpl impleme
|
|||||||
return new SimpleFunctionDescriptorImpl(containingDeclaration, null, annotations, name, kind, source);
|
return new SimpleFunctionDescriptorImpl(containingDeclaration, null, annotations, name, kind, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@kotlin.Deprecated(message = "This method is left for binary compatibility with android.nav.safearg plugin. Used in SafeArgSyntheticDescriptorGenerator.kt")
|
||||||
|
public SimpleFunctionDescriptorImpl initialize(
|
||||||
|
@Nullable ReceiverParameterDescriptor extensionReceiverParameter,
|
||||||
|
@Nullable ReceiverParameterDescriptor dispatchReceiverParameter,
|
||||||
|
@NotNull List<? extends TypeParameterDescriptor> typeParameters,
|
||||||
|
@NotNull List<ValueParameterDescriptor> unsubstitutedValueParameters,
|
||||||
|
@Nullable KotlinType unsubstitutedReturnType,
|
||||||
|
@Nullable Modality modality,
|
||||||
|
@NotNull DescriptorVisibility visibility
|
||||||
|
) {
|
||||||
|
return initialize(extensionReceiverParameter, dispatchReceiverParameter, Collections.<ReceiverParameterDescriptor>emptyList(),
|
||||||
|
typeParameters, unsubstitutedValueParameters, unsubstitutedReturnType, modality, visibility, null);
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public SimpleFunctionDescriptorImpl initialize(
|
public SimpleFunctionDescriptorImpl initialize(
|
||||||
|
|||||||
Reference in New Issue
Block a user