Minor, delete outdated assertions in ImplementationBodyCodegen

This commit is contained in:
Alexander Udalov
2014-07-10 21:05:19 +04:00
parent 7673443fe1
commit 2a763598e7
2 changed files with 1 additions and 9 deletions
@@ -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);
@@ -21,5 +21,5 @@ public enum OwnerKind {
IMPLEMENTATION,
TRAIT_IMPL;
TRAIT_IMPL
}