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 }