Don't generate secondary constructors for inline class wrapper

This commit is contained in:
Dmitry Petrov
2018-08-30 18:20:48 +03:00
parent 65881dda97
commit 85826d304e
4 changed files with 35 additions and 2 deletions
@@ -454,8 +454,10 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
try {
lookupConstructorExpressionsInClosureIfPresent();
constructorCodegen.generatePrimaryConstructor(delegationFieldsInfo, superClassAsmType);
for (ClassConstructorDescriptor secondaryConstructor : DescriptorUtilsKt.getSecondaryConstructors(descriptor)) {
constructorCodegen.generateSecondaryConstructor(secondaryConstructor, superClassAsmType);
if (!descriptor.isInline()) {
for (ClassConstructorDescriptor secondaryConstructor : DescriptorUtilsKt.getSecondaryConstructors(descriptor)) {
constructorCodegen.generateSecondaryConstructor(secondaryConstructor, superClassAsmType);
}
}
}
catch (CompilationException | ProcessCanceledException e) {