simplify ConstructorDescriptorImpl.getExpectedThisObject
(remove never-executed code)
This commit is contained in:
+1
-6
@@ -56,12 +56,7 @@ public class ConstructorDescriptorImpl extends FunctionDescriptorImpl implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static ReceiverDescriptor getExpectedThisObject(@NotNull DeclarationDescriptor descriptor) {
|
private static ReceiverDescriptor getExpectedThisObject(@NotNull ClassDescriptor descriptor) {
|
||||||
if (descriptor instanceof ConstructorDescriptor) {
|
|
||||||
ConstructorDescriptor constructorDescriptor = (ConstructorDescriptor) descriptor;
|
|
||||||
ClassDescriptor classDescriptor = constructorDescriptor.getContainingDeclaration();
|
|
||||||
return getExpectedThisObject(classDescriptor);
|
|
||||||
}
|
|
||||||
DeclarationDescriptor containingDeclaration = descriptor.getContainingDeclaration();
|
DeclarationDescriptor containingDeclaration = descriptor.getContainingDeclaration();
|
||||||
return DescriptorUtils.getExpectedThisObjectIfNeeded(containingDeclaration);
|
return DescriptorUtils.getExpectedThisObjectIfNeeded(containingDeclaration);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user