Do not generate bodies for functions from Any for light classes
#KT-25894 Fixed
This commit is contained in:
@@ -82,6 +82,12 @@ public class FunctionsFromAnyGeneratorImpl extends FunctionsFromAnyGenerator {
|
||||
}
|
||||
|
||||
mv.visitAnnotation(Type.getDescriptor(NotNull.class), false);
|
||||
|
||||
if (!generationState.getClassBuilderMode().generateBodies) {
|
||||
FunctionCodegen.endVisit(mv, "toString", getDeclaration());
|
||||
return;
|
||||
}
|
||||
|
||||
InstructionAdapter iv = new InstructionAdapter(mv);
|
||||
|
||||
mv.visitCode();
|
||||
@@ -139,6 +145,11 @@ public class FunctionsFromAnyGeneratorImpl extends FunctionsFromAnyGenerator {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!generationState.getClassBuilderMode().generateBodies) {
|
||||
FunctionCodegen.endVisit(mv, "hashCode", getDeclaration());
|
||||
return;
|
||||
}
|
||||
|
||||
InstructionAdapter iv = new InstructionAdapter(mv);
|
||||
|
||||
mv.visitCode();
|
||||
@@ -201,6 +212,12 @@ public class FunctionsFromAnyGeneratorImpl extends FunctionsFromAnyGenerator {
|
||||
}
|
||||
|
||||
mv.visitParameterAnnotation(isErasedInlineClassKind ? 1 : 0, Type.getDescriptor(Nullable.class), false);
|
||||
|
||||
if (!generationState.getClassBuilderMode().generateBodies) {
|
||||
FunctionCodegen.endVisit(mv, "equals", getDeclaration());
|
||||
return;
|
||||
}
|
||||
|
||||
InstructionAdapter iv = new InstructionAdapter(mv);
|
||||
|
||||
mv.visitCode();
|
||||
|
||||
Reference in New Issue
Block a user