From e0ac80a7ce851e1d60fd3dd5d06573b73f65f340 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Tue, 5 Jun 2012 00:59:48 +0400 Subject: [PATCH] simplify ConstructorDescriptorImpl.getExpectedThisObject (remove never-executed code) --- .../jet/lang/descriptors/ConstructorDescriptorImpl.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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 11afe1e9036..2fe1e75e63f 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/ConstructorDescriptorImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/ConstructorDescriptorImpl.java @@ -56,12 +56,7 @@ public class ConstructorDescriptorImpl extends FunctionDescriptorImpl implements } @NotNull - private static ReceiverDescriptor getExpectedThisObject(@NotNull DeclarationDescriptor descriptor) { - if (descriptor instanceof ConstructorDescriptor) { - ConstructorDescriptor constructorDescriptor = (ConstructorDescriptor) descriptor; - ClassDescriptor classDescriptor = constructorDescriptor.getContainingDeclaration(); - return getExpectedThisObject(classDescriptor); - } + private static ReceiverDescriptor getExpectedThisObject(@NotNull ClassDescriptor descriptor) { DeclarationDescriptor containingDeclaration = descriptor.getContainingDeclaration(); return DescriptorUtils.getExpectedThisObjectIfNeeded(containingDeclaration); }