From 2a763598e75cfd79d9489a265f8cf01e039b1057 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Thu, 10 Jul 2014 21:05:19 +0400 Subject: [PATCH] Minor, delete outdated assertions in ImplementationBodyCodegen --- .../jetbrains/jet/codegen/ImplementationBodyCodegen.java | 8 -------- .../backend/src/org/jetbrains/jet/codegen/OwnerKind.java | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/ImplementationBodyCodegen.java b/compiler/backend/src/org/jetbrains/jet/codegen/ImplementationBodyCodegen.java index 391038b7987..dafc0b69fe1 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/ImplementationBodyCodegen.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/ImplementationBodyCodegen.java @@ -395,10 +395,6 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen { return; } - if (kind != OwnerKind.IMPLEMENTATION) { - throw new IllegalStateException("must be impl to reach this code: " + kind); - } - for (JetDelegationSpecifier specifier : delegationSpecifiers) { if (specifier instanceof JetDelegatorToSuperClass || specifier instanceof JetDelegatorToSuperCall) { JetType superType = bindingContext.get(BindingContext.TYPE, specifier.getTypeReference()); @@ -1148,10 +1144,6 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen { private void generatePrimaryConstructor(final DelegationFieldsInfo delegationFieldsInfo) { if (ignoreIfTraitOrAnnotation()) return; - if (kind != OwnerKind.IMPLEMENTATION) { - throw new IllegalStateException("incorrect kind for primary constructor: " + kind); - } - final MutableClosure closure = context.closure; ConstructorDescriptor constructorDescriptor = bindingContext.get(BindingContext.CONSTRUCTOR, myClass); diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/OwnerKind.java b/compiler/backend/src/org/jetbrains/jet/codegen/OwnerKind.java index f7e590a3025..dfc6c93c52e 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/OwnerKind.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/OwnerKind.java @@ -21,5 +21,5 @@ public enum OwnerKind { IMPLEMENTATION, - TRAIT_IMPL; + TRAIT_IMPL }