Minor, delete outdated assertions in ImplementationBodyCodegen
This commit is contained in:
@@ -395,10 +395,6 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kind != OwnerKind.IMPLEMENTATION) {
|
|
||||||
throw new IllegalStateException("must be impl to reach this code: " + kind);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (JetDelegationSpecifier specifier : delegationSpecifiers) {
|
for (JetDelegationSpecifier specifier : delegationSpecifiers) {
|
||||||
if (specifier instanceof JetDelegatorToSuperClass || specifier instanceof JetDelegatorToSuperCall) {
|
if (specifier instanceof JetDelegatorToSuperClass || specifier instanceof JetDelegatorToSuperCall) {
|
||||||
JetType superType = bindingContext.get(BindingContext.TYPE, specifier.getTypeReference());
|
JetType superType = bindingContext.get(BindingContext.TYPE, specifier.getTypeReference());
|
||||||
@@ -1148,10 +1144,6 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
|||||||
private void generatePrimaryConstructor(final DelegationFieldsInfo delegationFieldsInfo) {
|
private void generatePrimaryConstructor(final DelegationFieldsInfo delegationFieldsInfo) {
|
||||||
if (ignoreIfTraitOrAnnotation()) return;
|
if (ignoreIfTraitOrAnnotation()) return;
|
||||||
|
|
||||||
if (kind != OwnerKind.IMPLEMENTATION) {
|
|
||||||
throw new IllegalStateException("incorrect kind for primary constructor: " + kind);
|
|
||||||
}
|
|
||||||
|
|
||||||
final MutableClosure closure = context.closure;
|
final MutableClosure closure = context.closure;
|
||||||
ConstructorDescriptor constructorDescriptor = bindingContext.get(BindingContext.CONSTRUCTOR, myClass);
|
ConstructorDescriptor constructorDescriptor = bindingContext.get(BindingContext.CONSTRUCTOR, myClass);
|
||||||
|
|
||||||
|
|||||||
@@ -21,5 +21,5 @@ public enum OwnerKind {
|
|||||||
|
|
||||||
IMPLEMENTATION,
|
IMPLEMENTATION,
|
||||||
|
|
||||||
TRAIT_IMPL;
|
TRAIT_IMPL
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user