diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/ConstructorDescriptorImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/ConstructorDescriptorImpl.java index 5f93d341953..a7d5f9495c5 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/ConstructorDescriptorImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/ConstructorDescriptorImpl.java @@ -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 typeParameters, @NotNull List 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 typeParameters, @NotNull List unsubstitutedValueParameters, Visibility visibility) { super.initialize(null, getExpectedThisObject(getContainingDeclaration()), typeParameters, unsubstitutedValueParameters, null, Modality.FINAL, visibility); return this; diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/FunctionDescriptorImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/FunctionDescriptorImpl.java index e057306bbf3..4e865dfb81d 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/FunctionDescriptorImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/FunctionDescriptorImpl.java @@ -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 typeParameters, diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/NamedFunctionDescriptorImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/NamedFunctionDescriptorImpl.java index c5a5988ba02..cfb0139073f 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/NamedFunctionDescriptorImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/NamedFunctionDescriptorImpl.java @@ -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 typeParameters, @NotNull List 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() { diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/ErrorUtils.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/ErrorUtils.java index fb90916f3e6..fa82dbbf07a 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/types/ErrorUtils.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/ErrorUtils.java @@ -178,12 +178,8 @@ public class ErrorUtils { public static ConstructorDescriptor createErrorConstructor(int typeParameterCount, List positionedValueParameterTypes) { return new ConstructorDescriptorImpl(ERROR_CLASS, Collections.emptyList(), false).initialize( - null, - ReceiverDescriptor.NO_RECEIVER, Collections.emptyList(), // TODO Collections.emptyList(), // TODO - createErrorType(""), - Modality.OPEN, Visibility.INTERNAL ); }