Delete unjustified assert

It's ok to generate <clinit> in the light classes mode, it's not ok to generate
the code in it (currently there seems to be no sane way to assert that)
This commit is contained in:
Alexander Udalov
2014-06-23 16:19:56 +04:00
parent e31f2cfa23
commit 42991e05a1
@@ -199,11 +199,8 @@ public abstract class MemberCodegen<T extends JetElement/* TODO: & JetDeclaratio
@NotNull
protected ExpressionCodegen createOrGetClInitCodegen() {
DeclarationDescriptor descriptor = context.getContextDescriptor();
assert state.getClassBuilderMode() == ClassBuilderMode.FULL
: "<clinit> should not be generated for light classes. Descriptor: " + descriptor;
if (clInit == null) {
MethodVisitor mv = v.newMethod(OtherOrigin(descriptor), ACC_STATIC, "<clinit>", "()V", null, null);
mv.visitCode();
SimpleFunctionDescriptorImpl clInit =
SimpleFunctionDescriptorImpl.create(descriptor, Annotations.EMPTY, Name.special("<clinit>"), SYNTHESIZED);
clInit.initialize(null, null, Collections.<TypeParameterDescriptor>emptyList(),