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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user