hide FunctionDescriptor.initialize
This commit is contained in:
-7
@@ -45,13 +45,6 @@ public class ConstructorDescriptorImpl extends FunctionDescriptorImpl implements
|
||||
this.isPrimary = isPrimary;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public ConstructorDescriptorImpl initialize(@Nullable JetType receiverType, @NotNull ReceiverDescriptor expectedThisObject, @NotNull List<TypeParameterDescriptor> typeParameters, @NotNull List<ValueParameterDescriptor> unsubstitutedValueParameters, @Nullable JetType unsubstitutedReturnType, Modality modality, @NotNull Visibility visibility) {
|
||||
assert receiverType == null;
|
||||
return (ConstructorDescriptorImpl) super.initialize(null, expectedThisObject, typeParameters, unsubstitutedValueParameters, unsubstitutedReturnType, modality, visibility);
|
||||
}
|
||||
|
||||
public ConstructorDescriptorImpl initialize(@NotNull List<TypeParameterDescriptor> typeParameters, @NotNull List<ValueParameterDescriptor> unsubstitutedValueParameters, Visibility visibility) {
|
||||
super.initialize(null, getExpectedThisObject(getContainingDeclaration()), typeParameters, unsubstitutedValueParameters, null, Modality.FINAL, visibility);
|
||||
return this;
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ public abstract class FunctionDescriptorImpl extends DeclarationDescriptorImpl i
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
public FunctionDescriptorImpl initialize(
|
||||
protected FunctionDescriptorImpl initialize(
|
||||
@Nullable JetType receiverType,
|
||||
@NotNull ReceiverDescriptor expectedThisObject,
|
||||
@NotNull List<TypeParameterDescriptor> typeParameters,
|
||||
|
||||
+8
@@ -17,8 +17,11 @@
|
||||
package org.jetbrains.jet.lang.descriptors;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
|
||||
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.TypeSubstitutor;
|
||||
|
||||
import java.util.List;
|
||||
@@ -45,6 +48,11 @@ public class NamedFunctionDescriptorImpl extends FunctionDescriptorImpl implemen
|
||||
super(containingDeclaration, original, annotations, name, kind);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FunctionDescriptorImpl initialize(@Nullable JetType receiverType, @NotNull ReceiverDescriptor expectedThisObject, @NotNull List<TypeParameterDescriptor> typeParameters, @NotNull List<ValueParameterDescriptor> unsubstitutedValueParameters, @Nullable JetType unsubstitutedReturnType, @Nullable Modality modality, @NotNull Visibility visibility) {
|
||||
return super.initialize(receiverType, expectedThisObject, typeParameters, unsubstitutedValueParameters, unsubstitutedReturnType, modality, visibility);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public NamedFunctionDescriptor getOriginal() {
|
||||
|
||||
@@ -178,12 +178,8 @@ public class ErrorUtils {
|
||||
|
||||
public static ConstructorDescriptor createErrorConstructor(int typeParameterCount, List<JetType> positionedValueParameterTypes) {
|
||||
return new ConstructorDescriptorImpl(ERROR_CLASS, Collections.<AnnotationDescriptor>emptyList(), false).initialize(
|
||||
null,
|
||||
ReceiverDescriptor.NO_RECEIVER,
|
||||
Collections.<TypeParameterDescriptor>emptyList(), // TODO
|
||||
Collections.<ValueParameterDescriptor>emptyList(), // TODO
|
||||
createErrorType("<ERROR CONSRUCTOR RETURN TYPE>"),
|
||||
Modality.OPEN,
|
||||
Visibility.INTERNAL
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user